keepcalculator

06 Numbers and Powers

Couldn’t Unmount Disk Mac? Fixes That Work

Card No. 06·73167 · Updated · Standard formula, shown below

If your Mac says it couldn’t unmount a disk, the cause is almost always an app or system process that still has files open on it. You can usually fix it by quitting those apps, using Force Quit, or running a Terminal command, and in most cases you won’t need to restart your Mac.

Why Does This Happen?

macOS prevents a disk from being unmounted while any file on it is in use. This is a safety feature: it stops you from yanking out a drive mid-write, which could corrupt data. The most common culprits are:

  • Apps that have files open on the drive (e.g., a video editor with a project file, a music app with a library).
  • Finder windows showing the disk’s contents.
  • Background processes like Spotlight indexing, Time Machine backups, or antivirus scans.
  • Terminal sessions where the current directory is on the disk.
  • System services like Photos or Mail that may be importing or accessing files.

Sometimes the disk is simply in the middle of a write operation, and macOS needs a few more seconds. But if the error persists, something is holding on to it.

Quick Fixes to Try First

Start with the least disruptive steps—they solve most cases:

  1. Close all Finder windows that show the disk’s contents. Click the red close button on each window.
  2. Quit any app that might be using the disk. Check the Dock for apps with a dot under them, and right-click (or Control-click) the app icon and choose Quit.
  3. Eject again. Press Command+E with the disk selected in Finder, or click the eject icon next to it in the sidebar.
  4. Wait a few seconds and try again. Sometimes the disk is just busy.
  5. Restart Finder. Hold Option, right-click the Finder icon in the Dock, and choose Relaunch. This clears Finder’s file handles without closing your apps.

If none of those work, move on to the more forceful methods below.

Force Unmount with Terminal

Terminal gives you direct control over the unmount process. Open Terminal (in /Applications/Utilities) and try these commands in order:

  1. List mounted volumes: ls /Volumes — this shows the exact name of your disk.
  2. Try a normal unmount: diskutil unmount /Volumes/YourDiskName — replace YourDiskName with the actual name (use backslashes before spaces, e.g., My\ Drive).
  3. Force unmount: If that fails, use diskutil unmount force /Volumes/YourDiskName. This tells macOS to detach the disk even if files are in use.
  4. Eject instead: diskutil eject /Volumes/YourDiskName — this unmounts and then powers down the drive (for external drives).

If you get a message like “Resource busy,” you can find the offending process with lsof | grep /Volumes/YourDiskName. The output shows the process IDs (PIDs). You can then quit that process with kill PID (replace PID with the number). Be careful—killing a system process can cause issues, so only kill processes you recognize.

Use Activity Monitor to Find the Culprit

Activity Monitor is a built-in tool that shows every running process. To find what’s using your disk:

  1. Open Activity Monitor (in /Applications/Utilities).
  2. Click the X button in the toolbar (or press Command+F) and type the volume name in the search box.
  3. Look for any process that appears in the results—those are the ones with open files on the disk.
  4. Select the process and click the X in the toolbar to force quit it. Be cautious: don’t quit system processes like kernel_task or mds (Spotlight) unless you’re sure.

After quitting the process, try ejecting again. If you can’t identify the process, the next step is to restart your Mac.

When All Else Fails: Restart Your Mac

Restarting clears all file locks and is the most reliable fix. Before you restart, make sure no important data is being written to the disk. If the disk is an external drive, you can also try:

  • Shut down instead of restart—then disconnect the drive after the Mac is fully off.
  • Use Safe Mode (hold Shift during startup) to boot with minimal extensions, which often allows you to eject the drive.

After restarting, the disk should be unmounted and safe to remove. If you still can’t eject it, the drive itself may be failing or the connection may be faulty—try a different cable or port.

Common Mistakes and Misconceptions

One common mistake is assuming that closing the app that opened the disk is enough. Some apps keep background processes running even after you close the main window. For example, a photo editor might have a background importer that still holds the disk open.

Another misconception is that “eject” and “unmount” are the same. Ejecting a disk unmounts it and, for external drives, also powers it down. Unmounting just detaches the file system. If you only unmount, the drive may still spin, and you can’t safely unplug it until you eject or power it off.

Also, don’t assume that a disk that won’t unmount is corrupted. It’s usually just a busy process. But if you repeatedly get errors and the disk is an external drive, check its health with Disk Utility’s First Aid.

Frequently Asked Questions

Why does my Mac say “The disk wasn’t ejected because one or more programs may be using it”?

This is the standard message when a file is in use. The fix is to quit the program(s) that have files open on the disk. You can find them using Activity Monitor or the lsof command in Terminal.

Is it safe to force unmount a disk?

Force unmounting (with diskutil unmount force) is generally safe if the disk is not being written to at that moment. It can cause data loss if a write is in progress, so it’s best to try normal unmount first and ensure no critical files are being saved.

What does “Resource busy” mean in Terminal?

It means a process has an open file handle on the disk. Use lsof to see which process, then quit that process gracefully or with kill.

Can I eject a disk from Disk Utility?

Yes, open Disk Utility, select the volume, and click the eject button (or press Command+E). It’s the same as ejecting from Finder, but it can be useful if Finder is unresponsive.

Why does my external drive eject but immediately re-mount?

This usually happens when a background process (like a backup or sync app) automatically re-opens the drive. Check your login items in System Settings > General > Login Items and disable any app that might be doing this.

What if the disk still won’t eject after restart?

If a restart doesn’t help, the drive may have a hardware issue or a corrupted file system. Try connecting it to another Mac or PC to see if it mounts there. If it does, run First Aid in Disk Utility on the Mac.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →