What to do when a Mac says a file is in use and will not move
The message means an app or a background process still has the file open, and macOS will not pull it out from under that process. Close the document or quit the app that is using it, then try again. If you cannot tell which app that is, the steps below find it, and a restart clears it when nothing else does.
What the message is telling you
Finder’s wording is “The operation can’t be completed because the item is in use”, with the item’s name in the middle. You see it when you move a file to another disk, delete it, empty the Trash or replace it with a newer copy. Ejecting a drive has its own version, which says the disk was not ejected because one or more programs may be using it.
It helps to know when the rule applies. Moving a file to another folder on the same disk often works even while the file is open, because the file itself is not rewritten, only listed in a new place. Moving to a different disk is really a copy followed by deleting the original, and deleting is what an open file blocks. Emptying the Trash and ejecting a drive hit the same wall.
Nothing is damaged. The check exists because removing a file while an app is still writing to it could leave that file broken.
The usual suspects
- The file is open in an app. Closing the window is not always enough. Many Mac apps keep running with no windows open and may still hold the file. Quit the app with Command-Q.
- Something is still writing it. A download, an export, a render or a copy that has not finished. Wait until it does.
- A preview is showing it. A Quick Look panel, or Finder’s preview pane playing a video, can hold a file. Close the panel or select a different item.
- A disk image is mounted. A .dmg file counts as in use for as long as the volume inside it is mounted. Eject that volume in the Finder sidebar first, then move or delete the .dmg.
- A background job is busy. Spotlight indexing a newly attached drive, a backup in progress or a sync service uploading. These finish without help. Give them a few minutes.
- An app crashed. A helper process can be left behind holding the file after its app has gone.
Release the file the gentle way
Work down this list and stop as soon as the move succeeds.
- Look at the Dock for apps with a dot under their icon. Switch to the one most likely to have the file, save if needed, and close the document.
- Quit that app with Command-Q, then try the move again.
- If the app does not respond, press Option-Command-Esc, select it and click Force Quit. Unsaved changes in that app are lost, so this is not the first thing to try.
- If no app seems responsible, relaunch Finder. Press Option-Command-Esc, select Finder and click Relaunch.
- As a last resort, restart the Mac. In the restart dialog, untick “Reopen windows when logging back in”, so the same app does not open the same file again.
Find out exactly which app has the file
Guessing gets tiresome. Terminal can name the process.
- Open Terminal from Applications > Utilities.
- Type
lsoffollowed by a space. Do not press Return yet. - Drag the stuck file from Finder into the Terminal window. Its path is inserted for you.
- Press Return.
The finished command looks like this:
lsof /Users/you/Documents/Report.pages
Each line of output is one process that has the file open. The first column is the name of the process and the second is its ID number. If nothing is listed, a system process may be the holder. Run the same command with sudo in front and enter your administrator password to see those too.
For a drive that will not eject, give lsof the drive itself:
sudo lsof /Volumes/DriveName
If the list includes a Terminal window of your own, that is a common surprise: a shell whose current folder is on the drive counts as using it. Close that window or cd somewhere else.
Activity Monitor offers a second view. Select a process, click the Info button in the toolbar and open the Open Files and Ports tab to see everything that process has open. This is a good way to confirm a suspect.
Once you have a name, quit it normally if it is an app. If it is a system process such as mds (Spotlight) or backupd (Time Machine), waiting is better than forcing.
When you only need the file somewhere else
If the goal is to have the file in a second place, not to remove it from the first, copy it. Hold Option while you drag and Finder makes a copy and leaves the original where it is. Reading an open file is usually allowed, so the copy goes through. Delete the original later, once the app has let go.
One caution: if an app is still writing the file, the copy can be incomplete. Open the copy and check it before you rely on it. Copy, move, or alias when you drag a file on a Mac explains what each modifier key does to a drag.
Do not confuse it with these
A few other messages look similar and have different fixes.
- The item is locked. Select it, press Command-I and untick Locked.
- Finder asks for an administrator name and password, or says you do not have permission. That is about who owns the file or folder, not about who has it open.
- An item with the same name already exists. See When Finder says an item with the same name already exists.
Where a shelf fits, and where it does not
A blocked move usually interrupts something larger. You were filing a dozen things, one of them is stuck, and now you have to go deal with an app while remembering where that file was meant to go.
Ledge gives the stuck file a place to wait. Drag it up to the notch at the top of the screen and let go. It sits on a shelf that drops from the notch until you take it somewhere. Quit the app that had it open, finish the rest of the filing, then open the shelf with Option-Space or a click on the notch and drag the file onto its destination folder.
To be plain about the limits: Ledge does not override the in-use rule and cannot force a file free. Dropping from the shelf onto Finder moves the file itself, so macOS applies the same check it applies to any other drag. What the shelf saves is the remembering and the window arranging. It runs with no account and no cloud, and needs macOS 14 Sonoma or later.
Questions
Is it safe to force quit an app to free a file?
It frees the file, but unsaved work in that app is lost and a file that was being written can be left incomplete. Quit normally whenever the app still responds.
Why does the error come back after a restart?
Something reopened the file at login. Untick “Reopen windows when logging back in” when you restart, and look through the Login Items section of System Settings > General for the app involved.