Skip to content

7 Ways to Delete a File that Mac Says is in Use (Operation Can’t Be Completed)

Does your Mac computer show “The operation can’t be completed because the item is in use” when trying to delete certain files or clear the trash? This usually happens when an app or program in the background is using a file you want to remove or move to the bin. Thankfully, you can force delete these files. Here, let’s see easy ways to force delete the files in use by other programs on your Mac.

Delete a File that Mac Says is in Use

Why Do You See “Operation Can’t Be Completed Because The Item Is In Use?”

At times, Mac prevents you from deleting files currently being used by another software on the machine. This is because it feels that removing those files or emptying the trash would corrupt the software in use. This is where you’d face issues like:

  • Mac not allowing to delete a file.
  • “The operation can’t be completed because the item is in use” error message.
  • Mac not letting you empty the trash or bin.

How to Delete a File In Use By Other Apps or Processes on Mac?

To delete a file that throws an error saying it’s currently being used, you need to stop the application using it in the background. Several ways to do it include force quitting the app, restarting your Mac, deleting the file using Terminal, and more. Check all of them in detail below.

Method 1- Restart Your Mac

The easiest way to fix “operation can’t be completed” while deleting a file is to restart your Mac computer. Doing so will exit all active and inactive processes running in the background and give your machine a fresh start. If it doesn’t work or you don’t want a restart, proceed with the other methods below.

Method 2- Force Quit All Apps and Delete the File

Mac won’t let you delete the file if a foreground application uses the same. An easy way to fix it would be to quit all the active apps and then delete the file, as shown below.

1. Click the Apple icon on the top left menubar and select Force Quit. Alternatively, you can press Command + Option + Escape.

2. Select the app you think might be using the file. Tap Force Quit.

3. Tap Force Quit again. Once you’ve quit the app, try deleting the file again.

If you’re unsure which program might be using the file, select and quit all of them. Make sure you don’t have any unsaved data.

Method 3- Find and Kill the App Which is Using the File

The next method is to use Terminal to find out which files are currently in use or which your Mac thinks are in use. A simple terminal command “Lsof,” which means the list of all files does the job, post which you can kill the app which is using the file. Follow the steps below:

1. Open Finder > Applications > Utilities and launch Terminal on your Mac.

2. Type the command in the terminal but don’t press Return yet- Lsof.

3. Add a space and then paste the file path. For example: Lsof /Users/ritik/Desktop/Test.png for an image in the desktop folder.

How to copy a file path on Mac? Press and hold the Option button and right-click the file. In the context menu, select Copy <filename> as the path name.

4. Once you enter the command, Terminal will give you the list of apps currently using the file. In this case, it’s the Preview app.

5. You can force quit those applications or kill the programs via Activity Monitor.

6. To do so, open Activity Monitor on your Mac.

7. Search for the program and all its related processes, and tap the X button.

8. Next, hit Quit or Force Quit to close the program.

Once done, try deleting the file. You should be able to do it normally without any error messages.

Method 4- Delete the File Using Terminal

Like Windows, Mac lets you delete files via Terminal Window. So if you’re unable to move a file to the bin, follow the steps below to erase the file permanently via Terminal:

1. Launch Terminal on your Mac from either Finder > Applications or the launchpad.

2. Once the window opens, type rm.

3. Drag and drop the file you want to delete into the Terminal window. OR paste the file path manually.

4. Finally, press Return (or Enter) to delete the file permanently.

Method 5- File Locked or Insufficient Privileges?

If you cannot delete a file on Mac, you may either not have sufficient privileges or the file is probably locked. Check if you can get an Administrator to delete the file. If you already have an admin account, check if the file is locked, as shown below:

1. Open Finder on your Mac.

2. Right-click the file you want to delete and click Get Info.

3. Head to the General tab.

4. Here, uncheck the box for Locked. On the same page, you can also see the read and write privileges for all users on the machine.

You shall now be able to delete the file easily. On the same page, you can also see the read and write privileges for all users on the machine.

Method 6- Disable Login Items and Delete the File

At times, the app using the file may start automatically in the background when you restart your machine. This is why you may see “the operation can’t be completed because the item is in use” when trying to delete the file despite a reboot. In this case, you need to remove the app or program from the list of startup items, as shown below:

1. Click the Apple icon on the top left and select System Settings (or System Preferences).

2. Select General > Login Items.

3. Select the app that uses the file or that you think might have something to do with the file. And click the – button.

4. Furthermore, disable the toggle for “Allow in Background” if the app is in the list.

Method 7- Restart Mac in Safe Mode

If a third-party program or background service is continuously using a file you want to delete and you still can’t figure out what it is, reboot your Mac in Safe mode and delete it. Turn off your Mac by choosing Shut Down in the Apple menu and follow the steps below:

1. Once Mac is completely off, press the Power button until you see “Loading startup options.”

2. Select a volume. Press and hold the Shift key and click Continue in Safe Mode.

3. Your Mac will now restart in safe mode. Open Finder, right-click the file and hit Move to Bin.

Nothing Works? Repair Your Mac in Recovery Mode

If nothing works, there could be malware or an underlying issue with your disk. You can either contact Apple support or repair your Mac in recovery mode.

For the latter, reboot your Mac in Recovery Mode and wipe the disk using Disk Utility. Then, re-install macOS using the given options. Note that this will erase all your personal data on the drive.

(Resolved) Mac Won’t Delete a File in Use by Other Programs

This is how you can delete a file Mac says is in use by other apps or programs. I hope the above guide helps you erase any file you want to remove on your macOS device. If you still face any errors, feel free to reach out via email or social media. Stay tuned for more such updates.

You might be interested in:

You can also follow us for instant tech news at Google News or for tips and tricks, smartphones & gadgets reviews, join GadgetsToUse Telegram Group or for the latest review videos subscribe GadgetsToUse Youtube Channel.

Use Enhanced Google Site Search Text Box Below To Find Solution to Your Tech Problems

Ritik Singh

Ritik Singh

Ritik is the Managing Editor at GadgetsToUse. He manages the website and oversees the content to ensure it's as informative as possible. He also heads the sub-sites in the network. Putting work aside, he has a great interest in personal finance and is also a keen motorcycle enthusiast.View Author posts

Tags: