Mac won't eject an external drive, or says "Disk Not Ejected Properly"? What's using it and how to fix it

Either the Mac refuses to let go of the drive, or it keeps telling you that you pulled it out without ejecting when you didn't touch it. Both have a short list of causes.

Won't eject: find what's using it

Usual suspectHow to tellWhat to do
An app with a file open from the driveA video, document or project from the drive is open somewhere.Close the file and quit the app, not just its window.
Spotlight indexingA drive you just plugged in, and lsof shows mds or mdworker.Wait a few minutes, or add the drive to System Settings, Spotlight's privacy list if you never search it.
Time MachineA backup is running or preparing.Wait for it, or choose Skip This Backup from the Time Machine menu.
Photos, Music or another library stored on the driveThe app opens that library at startup.Quit the app before ejecting.
A Terminal windowThe prompt is somewhere under /Volumes.Type cd ~ or close the window.
Quick Look, a preview pane, or an antivirus scanNothing obvious is open.Close Finder windows showing the drive, wait a minute, or log out and back in.

See exactly what's holding it

Open Terminal (it's in Applications, Utilities). Replace NAME with the drive's name as Finder shows it, keeping the quotes if it has spaces:

lsof +D "/Volumes/NAME"

The first column is the program's name. Quit it, then eject. If lsof prints nothing, try again in a moment: Spotlight and backups come and go. You can also eject from Terminal, which gives a clearer error than Finder:

diskutil list
diskutil eject /dev/disk4

Use the disk number from diskutil list for your external drive, and check the size column so you pick the right one.

Is Force Eject safe?

Force Eject tells programs to let go whether they're finished or not. If one was in the middle of writing, that file can end up damaged. It's fine when you know nothing was saving, and risky during a copy or backup. If you're unsure, shutting the Mac down cleanly ejects everything properly.

"Disk Not Ejected Properly" when you didn't touch it

What really happens if you just pull it out

Computers often hold writes in memory for a moment and save them in a batch. Ejecting tells the computer to finish every write and close the drive's file list properly. Pull the cable mid-write and you can lose the file being saved or, rarely, damage the drive's file list. APFS, Mac OS Extended and NTFS keep a journal that helps them recover. exFAT and FAT32 don't, so sticks and cards shared between Mac and Windows are the ones most worth ejecting. If a drive complains after an unplanned pull, run First Aid in Disk Utility.

On Windows, the same "in use" message appears as "Problem ejecting USB mass storage device". Close the program it names, or find it under Task Manager. Since 2018, Windows sets USB drives to Quick removal by default, which makes pulling them out less risky, but ejecting is still the safe habit.

Related

Drive asks to be formatted after unplugging · Time Machine slow or stuck · Drive copying slowly · USB stick or external drive not showing up · External drive read-only on a Mac (NTFS) · Back up phone photos to an external drive · SD card full but looks empty · What is exFAT? (Wirebook)

Questions

Why won't my Mac let me eject my external drive?

Something still has a file open on it: an app, Spotlight indexing, Time Machine, a Photos library or a Terminal window. Quit those, or run lsof +D "/Volumes/NAME" in Terminal to see what's using it.

Is it OK to force eject an external drive on a Mac?

Only when you're sure nothing is saving to it. Force Eject can damage a file that was being written. Shutting the Mac down is the safe alternative.

Why does my Mac say Disk Not Ejected Properly when I didn't unplug it?

The drive lost power or connection, usually during sleep, through an unpowered hub or over a loose cable. Plug it straight in, try another cable, and turn off putting hard disks to sleep to test.

Do I really need to eject a USB stick before unplugging it?

It's the safe habit. Ejecting finishes any pending writes. exFAT and FAT32 sticks have no journal, so an unplanned pull can damage files more easily than on APFS or NTFS.

My drive won't eject and nothing is open. What now?

Wait a minute for Spotlight or a backup to finish, close Finder windows showing the drive, then try diskutil eject in Terminal. Logging out or shutting down always releases it.

Published .

Try it

Related guides

Newest guides