How to Eject an External Hard Drive on Mac
Four ways to eject an external hard drive on a Mac, plus what to try in order when macOS says a program is using the disk and it won't eject.
To eject an external hard drive on a Mac, click the small eject icon next to the drive in the Finder sidebar, then wait until the drive disappears from Finder before you unplug it. If macOS answers with “The disk wasn’t ejected because one or more programs may be using it,” skip to the fixes below.
Ejecting matters because macOS keeps some writes in memory before they reach the drive. A normal eject lets those finish and unmounts the volume. It lowers the risk of a damaged drive, but it is not a substitute for a backup.
Four ways to eject
Any of these does the same thing:
- Finder sidebar. Open a Finder window and find the drive under Locations. Click the eject icon beside its name.
- Right-click. Control-click the drive icon on the desktop or in Finder and choose Eject “Drive Name”.
- Keyboard. Select the drive in Finder and press
Command + E. The same command is in the menu bar as File > Eject. - Drag to the Trash. If your drive shows on the desktop, drag it to the Trash in the Dock. The Trash icon turns into an Eject symbol while you drag. Drives only appear on the desktop if Finder > Settings > General > External disks is ticked.
Wait for the icon to vanish from Finder and the sidebar. That is your confirmation, not the drive’s activity light.
When the drive will not eject
The usual cause is a program still holding a file open on the drive. macOS refuses to eject so that program can’t write to a disk that is gone. Work through these in order and retry a normal eject after each step.
1. Finish and close what you can see. Save and close documents, wait for copies and exports to finish, and quit apps that opened files from the drive. Check Photos, Music, Final Cut Pro and Lightroom libraries too, since they can keep a library open after the window is closed.
2. Give the background jobs a minute. Spotlight indexes a drive when you first connect it or after you copy a lot onto it. Time Machine, iCloud Drive, Dropbox and Google Drive can also hold files. Wait a minute or two and try again. Time Machine has its own steps in Time Machine won’t let you eject.
3. Find the program holding the drive. Open Terminal (Applications > Utilities) and run:
lsof /Volumes/YourDriveName
Replace YourDriveName with the name you see in Finder, and put quotes around it if it contains spaces. The first column names each process with a file open on the drive. Quit that app the normal way, then eject again. The lsof guide explains the columns, and how to find what process is using a drive covers the rest.
The usual names you will see:
| Process | What it is |
|---|---|
mds, mds_stores, mdworker_shared |
Spotlight indexing |
QuickLookUIService, quicklookd |
A Finder preview of a file on the drive |
backupd |
Time Machine |
cloudd, bird |
iCloud Drive sync |
Dropbox, Google Drive |
Cloud sync apps |
4. Relaunch Finder. Finder sometimes holds a stale reference. Press Option + Command + Esc, select Finder, and click Relaunch. This stops any copy Finder is running, so only do it when nothing is being transferred.
5. Stop Spotlight from indexing the drive. Open System Settings > Spotlight > Search Privacy (on older macOS it sits under Siri & Spotlight), click +, and add the drive. You lose Spotlight search on that drive, which rarely matters for a backup or media drive.
6. Ask for the eject from Terminal. This gives a clearer error than the Finder dialog:
diskutil list external
diskutil eject /Volumes/YourDriveName
The first command lists every volume on external disks. A drive can have more than one volume, and each must unmount. diskutil unmountDisk /dev/disk4 (use your own disk number) unmounts all of them at once.
7. Log out, or shut down. This is the fix Apple recommends when nothing else works. Apple’s own guidance is to log out and in again, then shut the Mac down if the disk still won’t eject. After shutdown, unplug the drive.
What not to do
Pulling the cable or forcing the eject while something is writing can lose files or leave the drive needing repair. There’s no process name or activity light that proves nothing is writing. The risks are laid out in Is force eject safe on Mac?.
diskutil unmount force exists, and it is a last resort for a drive you have already backed up.
Why the format matters
APFS recovers better from an interrupted write than exFAT, which has no journaling, so an exFAT drive deserves the most care about ejecting. If you are picking a format, see APFS vs exFAT.
If this keeps happening
If you do this often, the steps above are the manual version of what Ejecta does from the menu bar. It shows which process is holding your drive and offers to quit supported apps and retry the eject. The diagnosis is free. It can’t promise that every drive will eject, and it doesn’t certify that a force eject is safe.
Frequent random disconnects are a separate problem with different causes, covered in external hard drive keeps disconnecting on Mac.
Ejecta offers free drive diagnosis without a timed trial. The paid license unlocks quit and eject actions for supported apps, Eject All and Time Machine controls. System holders may require waiting, authorization or shutdown. Save work and finish transfers first.
Buy Now -Related articles
How to Find, Open, and Use an External Hard Drive on a Mac
Connect an external hard drive to your Mac, find it in Finder, open your files, and disconnect it safely. A …
How to Safely Eject a USB Drive From a Mac
Every way to eject a USB drive on a Mac, plus what to do when macOS says the disk is in use and won't let it …
External Drive Not Ejecting on Mac After Sleep
Mac waking from sleep and showing 'Disk Not Ejected Properly'? Here's why it happens and how to stop it for …
Why Your Mac Gets Slower When an External Drive Is Connected
Plugging in an external drive shouldn't slow down your whole system, but it often does. Here's what's …