macOS 'Your Disk Was Ejected Improperly' Fix
That 'Disk Not Ejected Properly' popup? Usually it's a bad cable or sleep setting. Here's the real fix for macOS Ventura through Sequoia.
1. Bad USB Cable or Port (The Most Common Culprit)
Nine times out of ten, this error isn't a software issue. It's a flaky cable or a loose USB port. The drive briefly loses power, macOS detects the disconnect, and you get that popup. I've seen it on MacBook Pros from 2018 to 2024, and on iMacs with both USB-A and USB-C ports.
Don't bother with software tweaks until you've swapped the cable. I waste more time on otherwise smart colleagues who skip this step.
What to try:
- Swap the cable. Use a known-good cable, ideally the one that came with the drive. Third-party USB-C cables vary wildly in power delivery and signal stability.
- Try a different port. On MacBooks, the left-side ports often share a controller. Move to the right side, or vice versa.
- For hubs: Plug the drive directly into the Mac's port. Bypass any USB hub or dock. I've seen CalDigit and Anker hubs cause this exact error on macOS Ventura 13.3+.
- Check for bent pins on USB-C connectors. If they're dirty, blow them out with compressed air.
If the error stops after swapping the cable or port, you're done. The problem was physical.
2. macOS Power Saving (Prevents Sleep Eject)
macOS has a 'feature' where it puts external disks to sleep after 10-15 minutes of inactivity. When the drive wakes up—say, because Spotlight indexes it or Time Machine checks in—the power transition can cause a brief dropout. macOS then shows the 'ejected improperly' message.
This hit hard on macOS Ventura and continues through Sequoia. The fix is to tell macOS to chill out with the sleep commands.
How to disable external disk sleep:
Open Terminal (found in /Applications/Utilities/) and run this command:
sudo pmset -a disksleep 0
This sets the disk sleep timer to 'never' for all power sources (AC and battery). You'll be prompted for your admin password. Type it (nothing appears as you type—that's normal), then hit Enter.
To confirm the change:
pmset -g | grep disksleep
It should return:
disksleep 0
Also, go to System Settings > Battery > Options (or Energy Saver on older macOS) and uncheck 'Put hard disks to sleep when possible.' On macOS Sequoia, it's under Displays in the same section.
Quick note: If you use a laptop on battery a lot, leaving disksleep at 0 might drain the battery slightly faster. For desktops, it's a non-issue.
3. Spotlight Indexing or Time Machine Conflicts
Less common but still a regular visitor: Spotlight deciding to re-index an external drive while it's sleeping, or Time Machine trying to back up and creating a power spike that drops the USB connection.
You'll see this pattern: the error pops up right when you hear the drive spin up, then immediately spin down. That's the OS competing with the hardware.
Fix 1: Exclude the drive from Spotlight
- Open System Settings > Siri & Spotlight > Spotlight Privacy (on older macOS: System Preferences > Spotlight > Privacy).
- Click the + button and add your external drive to the list.
- Wait 30 seconds. This prevents Spotlight from touching the drive at all.
Fix 2: Pause Time Machine on that drive
If the drive is a Time Machine backup destination, try using a different drive for backups, or schedule backups less aggressively.
Fix 3: Use Terminal to force-eject and reconnect cleanly
If the drive is stuck in a half-mounted state, run:
diskutil list
Find your external drive's identifier (looks like disk2 or disk3). Then force-eject it:
sudo diskutil eject disk2
Swap disk2 with your actual disk identifier. Physically unplug the cable, wait 5 seconds, then plug it back in. This forces a fresh negotiation between the drive and macOS.
Quick-Reference Summary Table
| Cause | Likelihood | Fix |
|---|---|---|
| Bad USB cable or port | ~70% | Swap cable, try different port, bypass hubs |
| macOS power saving for disks | ~20% | sudo pmset -a disksleep 0 and uncheck sleep in Settings |
| Spotlight or Time Machine conflict | ~8% | Exclude drive from Spotlight, pause Time Machine, force-eject |
If none of these work? It might be the drive itself. Check SMART status with smartctl (install via Homebrew) or try the drive on another computer. But honestly, start with the cable. That fixes it for most people in under two minutes.
Was this solution helpful?