What to Do If You Can’t Delete Files on Mac That Are In Use

What to Do If You Can't Delete Files on Mac That Are In Use

I don’t remember how many times I’ve encountered the message, “The operation can’t be completed because the item (file name) is in use.” This usually happens when I’m trying to delete a file either by right-clicking on the file and selecting the “Move to Trash” option from the context menu or by simply dragging the file into the trash bin. So, in case you’re wondering what to do if your Mac says it can’t delete files on Mac because they’re in use, read along through this short guide.

Reasons Why You Can’t Delete Files on Mac Because They’re in Use

The main reason why the error message saying, “The operation can’t be completed because the item (file name) is in use” appears is that an app or process is using the file you’re trying to delete. You may not know it because the app may be running in the background. The error message may also appear if your Mac thinks the file is in use even though it is not. If this happens, the file could be an obscure one that you didn’t even mean to drag into the trash bin.

We know this situation can sometimes be annoying for our users, that’s why we always recommend quick solutions before any manual procedure.

That being said, we suggest you try a comprehensive file management tool, namely Intego Washing Machine, that can easily remove unwanted files.

It provides comprehensive features which help by scanning your Mac system for various issues, including these files in question, and offers the option to delete them.

➡️ Get Intego Washing Machine

Quit All Open Apps Then Restart Your Mac

If you can’t discern which app is using the file that you want to delete but your Mac won’t delete it, try quitting all apps that are currently open. Then, restart your Mac and try deleting the file again by right-clicking on it or dragging it to the trash bin. If the error message still comes up, do the next step below.

Disable All Login Items

Login items are apps that open automatically when you start up your Mac. Some of these apps may run in the background and could use the file that you are trying to delete without you knowing it. So disable all login items temporarily and then try deleting the file after.

Time needed: 2 minutes

Follow the steps below to disable login items on your Mac.

  1. Go to System Settings (or System Preferences).

  2. Click General > Login items.

    General - Login items screenshot

  3. List the items under Open at Login.

    Open at login screenshot

  4. Select all the login items, then click Remove.

  5. Restart your Mac.

Try deleting the file again and see if the error message still appears or not.

Deleting Files on Mac That Won’t Delete Using Terminal

Another step that you can do if you cannot delete files on your Mac because they’re in use is to use Terminal. This is a pretty good way of determining which file on your Mac is in use or which file your Mac thinks is in use.

Follow the steps below to do this.

  1. Click on the Trash Icon in the dock to open it.
  2. Go to Applications, then click Utilities.
  3. Click Terminal.
  4. Type lsof on the command prompt.
  5. Drag the file you are trying to delete onto the Terminal window.
  6. Hit Return.

You should now see whether any apps are using the file that you are trying to delete. If a background process is using the file, you can delete it by launching Applications > Utilities > Activity Monitor, searching for the process, then selecting it and pressing Quit Process in the toolbar.

For further reading, check out how to delete old file versions in macOS.

Final Words

That’s pretty much what you can do if you can’t delete files on your Mac because they’re in use. More often than not, the error message saying, “The operation cannot be completed because (file name) is in use” usually appears when the file you are trying to delete is currently open in the associated application. If that’s the case, simply closing the file would enable your Mac to delete it.

Still, there are instances wherein you can’t delete files on your Mac because a system process is using it. If that’s the case, using the Terminal to identify this process and the Activity Monitor to quit the process should enable your Mac to delete the file.

One thought on “What to Do If You Can’t Delete Files on Mac That Are In Use

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.