Eject fails: "Files still in use"
If ejecting your drive fails with "Files still in use", an app still has something on the drive open. Find out which one from the Activity Log, quit it or move it off the drive, and eject again.
"Eject failed — Files still in use" means an app on your Mac still has a file on the drive open, so macOS won't let the drive go. Storage Studio records which apps were holding it. Quit those apps — or move a Terminal window off the drive — and eject again.
What you might see
- A notification: Eject failed — "Files still in use — see Inspect or Log window."
- In the Advanced view, the popover's output box shows "✗ Eject failed:", then Files still in use: with a list of the open files and the apps that have them open.
What eject already does for you
When you choose Eject Drive… from the More menu (or the eject item on the menu bar icon's right-click menu) and confirm, Storage Studio:
- Pauses automatic actions, so nothing new starts on the drive.
- Asks common developer tools that keep files open to quit — Xcode, Simulator, Android Studio, Docker, OrbStack and JetBrains IDEs — and waits up to 15 seconds for them.
- Asks macOS to eject the drive.
If one of those apps is waiting for you to save a document, it can't quit on its own, and you'll see "Some apps did not quit within 15s — eject may fail."
Likely causes
- An app has a document from the drive open.
- A moved app is still running from the drive.
- A Terminal window's current folder is on the drive.
- macOS is still indexing the drive for Spotlight, or Finder is still copying to it.
- An app that was asked to quit is showing a "save changes?" prompt.
Flowchart outline: Clearing what keeps the drive in use, then ejecting
- Eject failed - files still in use
- leads to Open the Activity Log from the More menu
- Open the Activity Log from the More menu
- leads to Find which apps were holding files
- Find which apps were holding files
- leads to Is it an app you can quit?
- Is it an app you can quit?
- Yes: leads to Save your work and quit it
- Terminal: leads to Move the window to a folder on your Mac or close it
- Spotlight or a copy in progress: leads to Wait a few minutes
- Save your work and quit it
- leads to Eject again
- Move the window to a folder on your Mac or close it
- leads to Eject again
- Wait a few minutes
- leads to Eject again
How to fix it
- Open Activity Log… from the More menu. The eject attempt is recorded there with the names of the apps that were holding files.
- Save your work in each of those apps and quit them. Answer any "save changes?" prompt that's waiting.
- In Terminal, change folder to somewhere on your Mac, or close the window.
- If a moved app from the drive is open, quit it too.
- Eject again from the More menu.
If it still fails and you can't tell what's holding the drive, restarting your Mac closes everything; you can then eject straight away.
Avoid pulling the cable while the drive is still in use. If it does get unplugged mid-move, nothing is lost — see The drive was unplugged during a move.
See also: Ejecting your drive safely · When your drive is disconnected · Something's not working: start here