macOS 'The operation can’t be completed' disk eject error fix
This error pops up when you try to eject an external drive and macOS says it's busy. Here's how to force it off without yanking the cable.
When does this error show up?
You're done copying files to an external drive — maybe a USB flash drive, an SD card, or a portable SSD. You click the eject icon next to it in Finder, or right-click and choose Eject. Then that gray dialog box appears: “The operation can’t be completed because the disk is in use.” Or sometimes it just says “The operation can’t be completed.” No other details. The drive stays mounted. You try again — same thing. It's frustrating because you know you closed all files.
This happens most often on macOS Ventura and Sonoma, but I've seen it on Monterey too. The trigger is almost always a background process — like Spotlight indexing, a cloud sync app (Dropbox, Google Drive), or a file that was opened by a quick-look preview that didn't release the handle properly.
Root cause in plain English
macOS won't eject a disk until every single file handle is closed. A file handle is basically a pointer that says 'this file is open by this app.' Even if you think you closed everything, sometimes a process — like mds (Spotlight) or backupd (Time Machine) — has a file open in the background. The system won't let go until those handles are released.
Yanking the cable without ejecting can cause data corruption. So the fix is to force the drive to unmount, which bypasses the busy check. Or you can find and kill the offending process.
Fix 1: Force eject via Disk Utility (easiest)
- Open Disk Utility. You can find it in Applications > Utilities, or hit Cmd+Space and type 'Disk Utility'.
- In the left sidebar, find your external drive. It's usually listed under 'External' with its volume name (like 'USB_DRIVE' or 'My Passport').
- Click on the volume name — not the parent disk entry above it. You want the one with the name you see on your desktop.
- Look at the toolbar at the top. You'll see an Eject button (it looks like a triangle with a line under it). Click it.
- Wait 5 seconds. You should see the drive disappear from the sidebar and the desktop. If it doesn't, move on to Fix 2.
Fix 2: Force unmount using Terminal (works 99% of the time)
This is the real fix. It tells the system 'I don't care what's using it, let go.'
- Open Terminal (Applications > Utilities > Terminal).
- Type
diskutil listand press Enter. You'll see a list of all disks. Look for your external drive — it'll be something like/dev/disk2or/dev/disk4. The 'NAME' column shows the volume name. Write down the identifier (likedisk2). - Now type this command, but replace
disk2with your actual identifier:
sudo diskutil unmountDisk force /dev/disk2 - Press Enter. You'll be asked for your Mac password. Type it (you won't see characters — that's normal) and press Enter.
- You should see: “Forced unmount of /dev/disk2 succeeded” or similar. The drive will vanish from Finder and the desktop.
Fix 3: Find and kill the process holding the disk (when you need to know why)
If you're curious what app is causing the trouble, or if fix 2 doesn't work (rare), do this:
- In Terminal, type
lsof | grep /Volumes/YourDriveName. Replace 'YourDriveName' with the actual name of your external volume (case-sensitive). - Press Enter. You'll see lines showing process names and PIDs. Look for something like
mds,CloudDocs, orbackupd. - Note the PID (second column, a number). Then type
sudo kill -9 PID(replace PID with the number). - Press Enter. That process is now dead. Try ejecting the drive normally from Finder again.
What to check if it still fails
- Time Machine: If the drive is your Time Machine backup, stop Time Machine first (System Settings > General > Time Machine Backup > toggle off). Then eject.
- Spotlight indexing: Sometimes macOS is just slow. Wait 30 seconds and try again. Or go to System Settings > Siri & Spotlight > Spotlight Privacy, add the drive to the list to stop indexing, then eject.
- File sharing: If you've shared that drive over the network (System Settings > General > Sharing > File Sharing), turn that off first.
- Corrupted filesystem: If none of the above works, the drive may have filesystem errors. Run First Aid in Disk Utility on the parent disk (not the volume) — that can fix underlying issues that prevent ejection.
- Last resort — shut down: Save everything, shut down your Mac normally, then remove the drive while the system is powered off. The drive will unmount cleanly during shutdown.
Pro tip: Never pull a cable without ejecting — even if you're annoyed. I've seen drives get corrupted from that. The Terminal force unmount is safe and quick. Learn it, use it.
Was this solution helpful?