Home > How to Tips

The operation can't be completed because the item is in use (Fixed)

Updated on Sunday, June 8, 2025

iBoysoft author Jenny Zeng

Written by

Jenny Zeng
Professional tech editor

Approved by

Connie Yang

English Français Deutsch やまと Español Português

Summary: To fix "The operation can't be completed because the item is in use:"

Fix 1: Empty the Trash
Fix 2: Delete the app in Launchpad
Fix 3: Find the process that's using the file and close it
Fix 4: Copy or delete files in use from Terminal
Fix 5: Disable SIP on Mac
Fix 6: Modify the file that's in use
Fix 7: Delete the file on another computer
Fix 8: Add the file to a cloud-syncing folder

The operation can

Recently, I've noticed that every time I try to empty the Trash, I receive the message "The operation can't be completed because the item "yy.app" is in use." So I was forced to skip this file to empty the Trash on my MacBook.

If I right-click on this file and choose Delete Immediately, it gives me another message: "The operation can't be completed because some items had to be skipped. For each item, choose File > Get Info, make sure “Locked” is deselected, and then check the Sharing & Permissions section. When you are sure the items are unlocked and not designated as Read Only or No Access, try again."

Some items had to be skipped

I followed the advice, but found the file is neither locked nor has permission issues. After some research, I discovered that the "The operation can't be completed because the item is in use" error message means that the file or app you're trying to copy or delete is currently being used by another process or application.

If you're facing the same issue, keep reading to learn how to delete a file that's in use.

How to fix the operation can't be completed because the item is in use?

Fix 1: Empty the Trash

In some cases, the message occurs when deleting a file directly in its folder or deleting files individually. If that's your case, try moving the files to the Trash and then emptying the Trash. This may be a weird fix, but it has worked for many users.

Fix 2: Delete the app in Launchpad

If it's an app that won't delete on Mac and it's downloaded from the Mac App Store, try to delete it from Launchpad. To do this, open Launchpad from the Dock, hold the Option key until the apps start to jiggle. Then click the x icon appearing in the upper-left corner of the app you want to delete.

Delete the app in Launchpad

Fix 3: Find the process that's using the file and close it

If you still can't delete files because they are in use, use Terminal to check which processes are currently using the files. The lsof command, which is shortened for list all open files, should give you some idea as to why the files can't be deleted.

  1. Launch Terminal from the Applications > Utilities folder.
  2. Type sudo lsof | grep in the Terminal window, leave a space, then drag and drop the file that won't delete to it.sudo lsof | grep file_pathCheck processes that are using the file
  3. Press Enter.
  4. Then you'll see all the processes that are using the file.

If it's another app, close it completely with the shortcut Command + Q. If it's a background process, open Terminal and kill it with the command below: (Replace PID with the number from lsof.)

kill -9 PID

Then try deleting the file again. If the error "The operation can't be completed because the item is in use" persists, reboot your Mac.

If it doesn't print anything, try other solutions below.

Fix 4: Copy or delete files in use from Terminal

If you can't copy or delete the file that's in use in Finder, do it from Terminal.

To force delete a file that is in use on a Mac, run the following command:

sudo rm -f file_path

For example, sudo rm -f /Users/jenny/.Trash/yy.app

To force delete a folder that's in use:

sudo rm -rf /path/to/folder

For example, sudo rm -rf ~/Downloads/OldApp

To force delete Trash on Mac:

sudo rm -rfv ~/.Trash

To force copy a file that's in use on a Mac, run this command:

cp -f file_path destination_file_path

For example, cp -f ~/Documents/contract.pdf ~/Backups/contract_backup.pdf

Fix 5: Disable SIP on Mac

Sometimes, the reason why you can't delete a file that says it's in use is due to system protections. SIP, or System Integrity Protection, prevents deletion of certain system-related files. In my case, the yy.app file is a macOS installer incompletely deleted and contains the InstallESD image.

To fix it, you must bypass SIP temporarily and then re-enable it after deleting the file or emptying the Trash.

If the macOS Trash cannot be emptied due to certain system-protected files, you can also give it a try.

  1. Boot into macOS Recovery Mode.
  2. Open Terminal from the Utilities menu.
  3. Run the command below to disable SIP.csrutil disableDisable SIP on Mac
  4. Restart normally and then delete the file that won't delete.
  5. Reenable SIP.

Fix 6: Modify the file that's in use

Another tip to resolve "The operation can't be completed because the item is in use" on Mac is to change the file's name or extension, or place it into a different folder. According to a user, after a reboot, he moved the stubborn file from Trash to the desktop, then changed the extension from .doc to .pdf and moved it back to the Trash. After that, he was able to empty the Trash permanently.

Fix 7: Delete the file on another computer

If you can't delete a file or an app on Mac, move it to an external drive and get rid of it on another computer. This can prevent any app or process from using the file, ensuring a successful deletion.

Fix 8: Add the file to a cloud-syncing folder

If there's a folder synced to a cloud service, you can add the file to it, then open the cloud service in a web browser and delete the file from there.

Here's how a user applied the tip and resolved the issue: "I encountered a similar issue and managed to remove the folders by placing them in a folder that was synced with OneDrive. In the OneDrive application, I selected "View Online" to access my OneDrive files through a web browser. I found the folder and deleted it online. This alteration synced back to the OneDrive app, consequently removing the folders from my Mac."

Which solution helped you copy, or delete the file that's in use? Share with us your solution!

 

Why do you receive 'The operation can't be completed because the item is in use'?

This error occurs when macOS prevents you from moving, deleting, or modifying a file/folder because it's actively being used by a process. Here's why it happens:

  • The file is currently open in an application. (like a document in Preview or Photoshop)
  • A background process is accessing it. (spotlight indexing, time machine backup, or iCloud sync)
  • The file is locked. (check by right-clicking → get info → "locked" is enabled)
  • A system process is using it. (like mds for Spotlight or cloudd for Cloud)
  • Permissions are restricted. (file ownership set to root or another user)
  • The file is in use by a hidden terminal process.
  • The file is part of a mounted disk image (.dmg) or network drive.
  • The file is being modified by a script or automation.
  • Finder is still indexing the file. (common after large file transfers)
  • The file is marked as "in use" due to a system error. (rare, but may require a reboot)

Spread the reasons to benefit others who can't delete files because they are in use!