← Back to Blog

How to Fix 'Disk Not Ejected Properly' on Mac

Learn why macOS shows the 'disk not ejected properly' warning and how to safely eject your external drives every time.

· 8 min read

You wake up your Mac and there it is: “Disk Not Ejected Properly.” Your external drive disconnected while your Mac was asleep, or maybe you pulled the cable without ejecting first. Either way, macOS is not happy about it.

This warning isn’t just nagging. Improper ejection can actually damage your data. Understanding why this happens and how to prevent it will save you from corrupted files and lost work.

Why proper ejection matters

When you’re working with files on an external drive, macOS doesn’t write every change to the disk immediately. It caches some data in memory and writes it later, in batches. This is faster and reduces wear on your drive, but it means there can be data sitting in limbo, waiting to be written.

When you click “Eject,” macOS flushes all pending writes to the disk, closes all open file handles, and tells the drive it’s safe to power down. Only after all of that completes does the drive icon disappear.

If the drive disconnects before this process finishes, any data that was cached but not yet written is lost. Worse, if the drive was in the middle of writing something (like updating a directory structure), you can end up with a corrupted filesystem.

The filesystem factor

The risk level depends on your drive’s format. HFS+ (Mac OS Extended) uses journaling, a recovery mechanism that logs changes before making them. APFS uses a similar protection called copy-on-write, where new data is written to a fresh location before old data is released. Both approaches help the filesystem recover to a consistent state if something goes wrong mid-write.

exFAT and FAT32 (common for drives used with both Mac and Windows) don’t have journaling. They’re more vulnerable to corruption from improper ejection. If you regularly use exFAT drives, proper ejection becomes even more critical.

That said, these protections aren’t magic. They can recover from some problems, but they can’t recreate data that was never written to the disk in the first place. A protected filesystem on an improperly ejected drive might boot up fine but still have lost your most recent changes.

Common causes of improper ejection

The warning appears in a few different situations.

Sleep and wake issues: Some external drives lose power when your Mac sleeps, especially if they’re bus-powered (drawing power from the USB port rather than their own adapter). When the Mac wakes up, the drive is gone, and macOS notices it wasn’t ejected properly. This is particularly common with USB hubs.

Cable problems: A loose or failing cable can cause momentary disconnections. The drive drops off the bus for a fraction of a second, then reconnects. macOS sees this as an improper ejection followed by a new connection.

USB hub flakiness: Cheap USB hubs are notorious for power and signal problems. They might work fine most of the time but occasionally drop connections, especially when multiple devices are drawing power.

Actually pulling the cable: Sometimes the simplest explanation is correct. You needed the drive, you unplugged it, you didn’t eject first. We’ve all done it.

How to prevent the warning

Eject before disconnecting: This seems obvious, but it’s the most effective solution. Right-click the drive and select “Eject,” or drag it to the Trash, or use the eject button in Finder’s sidebar. Wait for the icon to disappear before touching the cable.

Prevent sleep disconnection: If your drive disconnects during sleep, you have a few options. System Settings has an option under “Energy Saver” (or “Battery” on laptops) to “Prevent automatic sleeping when the display is off.” You can also look for “Put hard disks to sleep when possible” and disable it.

Use quality cables and hubs: If you’re experiencing random disconnections, try a different cable. USB-C cables especially vary wildly in quality. Same goes for hubs. A powered hub (one with its own AC adapter) is more reliable than a bus-powered one.

Check drive health: Drives that are failing can exhibit intermittent connectivity. If you’re seeing the warning frequently with a specific drive, run Disk Utility’s First Aid on it. Consider whether the drive might be dying.

When ejection won’t work

Sometimes you try to eject properly but macOS refuses, saying the disk is in use. This is frustrating, but at least you know about the problem before disconnecting.

The usual culprit is some process with files open on the drive. It might be Spotlight indexing the drive, a Terminal window with its current directory on the drive, or an application that still has a file open even though you’ve closed the document window.

You can find out what’s blocking ejection by opening Terminal and running:

sudo lsof /Volumes/YourDriveName

This lists every process with open files on that drive. Once you identify the blocker, you can quit that application or kill the process, then try ejecting again.

If you see the warning anyway

Already got the warning? Here’s what to do.

First, check that the drive actually reconnected. If you see it on your desktop or in Finder, it’s back. If not, reconnect it.

Run Disk Utility’s First Aid on the drive. This checks for filesystem errors and repairs what it can. Even if everything looks fine, it’s worth running after an improper ejection to catch any subtle damage.

Open a few files from the drive that you were recently working with. Make sure they open correctly and contain your latest changes. If something was being written during the disconnection, this is how you’ll find out.

For drives you don’t use frequently, consider running First Aid periodically even without seeing warnings. Small problems can compound over time.

A smoother workflow

If you’re constantly battling ejection issues, the problem might be the workflow itself. Hunting through Terminal to find blocking processes, killing them manually, then trying to eject again, this gets old fast.

Ejecta sits in your menu bar and shows you drive status at a glance. When something’s blocking ejection, it tells you exactly what, and lets you resolve it with a click. No Terminal, no guesswork, no crossing your fingers and yanking the cable.

The “Disk Not Ejected Properly” warning exists for a reason. Your data is worth the few seconds it takes to eject safely. But when macOS won’t let you eject, you need a way to fix that quickly, not a reason to force-disconnect anyway.

Tired of drive ejection issues?

Ejecta shows you exactly what's blocking your drive and lets you fix it with one click.

Get Ejecta for $14.99