Disk Not Ejecting
Apple macOS
Severity: MinorWhat Does This Error Mean?
When you try to eject a drive and macOS says it cannot because the disk is in use, it means some app or background process still has a file open on that drive. Forcefully unplugging a drive without ejecting can cause data corruption. macOS is protecting you from that risk. Finding and closing the app using the drive — or using the Terminal command to force-eject it — lets you safely remove the disk.
Affected Models
- MacBook Air
- MacBook Pro
- Mac mini
- iMac
- Mac Pro
- Mac Studio
Common Causes
- A Finder window is open showing a folder on the external drive
- Time Machine is currently backing up to or verifying the drive
- An application (such as Photos, iTunes/Music, or Lightroom) has its library stored on the drive
- Spotlight is indexing the drive in the background
- A background process like iCloud Drive, Dropbox, or backup software is syncing files on the drive
How to Fix It
-
Close all open Finder windows that show the external drive, and quit any apps that have files open from the drive. Then try ejecting again by right-clicking the drive in Finder and selecting Eject.
The most common culprit is simply a Finder window displaying the drive's contents. Closing it is often all you need to do.
-
Wait for Time Machine to finish if it is currently backing up. Look for the Time Machine icon in the menu bar — if it is spinning, a backup is in progress. Wait for it to stop, then eject.
You can also click the Time Machine menu bar icon and choose Stop This Backup to cancel the current backup and release the drive lock immediately.
-
Use Terminal to find which process is using the drive. Open Terminal and run: lsof | grep /Volumes/DriveName — replacing DriveName with the actual name of your drive. This shows every open file and which app has it open.
Once you know which app is using the drive, quit that app and try ejecting again.
-
Force eject from Terminal if the drive still will not eject. In Terminal run: diskutil eject /Volumes/DriveName — this is a safe force eject that macOS performs after making sure no writes are pending.
This is different from simply pulling the cable out. diskutil eject properly unmounts the file system and flushes all pending writes before releasing the drive.
-
As a last resort before physically unplugging, log out and log back in. Logging out closes all apps and their open files. Then eject the drive from the login screen or immediately after logging back in before opening any apps.
A full restart achieves the same thing if you cannot eject from the login screen.
When to Call a Professional
You should never need a technician for this issue — it is a software problem, not a hardware one. If the drive never appears in Finder at all and you cannot mount or eject it, that is a different problem and may indicate a failing drive.
Frequently Asked Questions
Is it really dangerous to pull out a USB drive without ejecting?
Yes, particularly for external hard drives and SSDs. Although macOS caches some writes in RAM before writing them to the drive, there may be write operations in progress or queued at any moment. Disconnecting the drive mid-write causes file corruption. For USB flash drives used only for reading (like copying a file off them), the risk is lower — but it is still a good habit to eject properly. Always eject before unplugging, especially for drives where you have been writing or copying files.
How do I stop Spotlight from indexing my external drive?
Go to Apple menu > System Settings > Siri and Spotlight > Spotlight Privacy (or System Preferences > Spotlight > Privacy on older macOS). Click the + button and add your external drive to the list. Spotlight will stop indexing it, which also stops it from holding a lock on the drive when you want to eject.
The drive says it ejected successfully but it is still visible on the desktop. Can I unplug it?
No — wait for the drive icon to disappear from the desktop before unplugging. Sometimes macOS shows the eject confirmation but the drive icon lingers for a few seconds while the system finishes flushing writes. The drive is safe to remove only once the icon is gone from both the desktop and Finder's sidebar. Typically this takes less than 5 seconds after a successful eject.