Volume failed to unmount / disk not ejected because in use macOS Origin: Platform & cloud OSI layer 7 · Application Last updated 5 Nov 2026

macOS: diskutil: Unmount of disk2s1 failed: at least one volume could not be unmounted / The disk wasn't ejected because one or more programs may be using it

macOS can't eject a drive because a process still has files open on it.

Exact message you may see The disk wasn't ejected because one or more programs may be using itdiskutil: Unmount of failed: at least one volume could not be unmountedVolume failed to unmountdiskutil unmount failed dissented by PIDDisk Not Ejected Properly
Seen on: macOS

Meaning

Find the process: lsof +D /Volumes/NAME (or "Force Eject" in the Finder dialog, which risks data loss). Close apps, Spotlight indexing (mdutil -i off) and terminals sitting in the volume. Then diskutil unmount force /Volumes/NAME or diskutil eject.

Common causes

  • App or terminal using files on the volume
  • Spotlight/Time Machine indexing it
  • Photos/Music library on the drive
  • Backup or antivirus scanning
  • Stuck process after a crash

⚡ Quick fix

  1. lsof +D /Volumes/NAME and quit the listed apps
  2. diskutil unmount force /Volumes/NAME
  3. diskutil eject /dev/diskN once unmounted

Detailed fix by platform

macOS

  1. diskutil list and lsof +D /Volumes/NAME

How to diagnose

  1. Process — lsof output?
  2. Index — Spotlight?
  3. Force — Data safe?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

Finder error code -36 — macOS: The Finder can't complete the operation because some data in "x" can't be read or written. (Error code -36) (macOS)Finder error code -36Finder error code -43 — macOS: The operation can't be completed because one or more required items can't be found. (Error code -43) (macOS)Finder error code -43hdiutil: create failed - Resource busy — macOS: hdiutil: create failed - Resource busy (or: hdiutil: couldn't eject "disk2" - Resource busy) (macOS)hdiutil: create faile…Homebrew Cask: It seems there is already an App at — Homebrew: Error: It seems there is already an App at '/Applications/Chrome.app' (macOS)Homebrew Cask: It see…Item is locked / cannot be deleted (chflags uchg) — macOS: The operation can't be completed because the item is locked / rm: Operation not permitted (uchg flag) (macOS)Item is locked / cann…Time Machine couldn't complete the backup — macOS: Time Machine couldn't complete the backup. / The backup disk image could not be mounted / Backup failed with error 18/19/21/22 (macOS)Time Machine couldn't…zsh: bad CPU type in executable — macOS (Apple Silicon): zsh: bad CPU type in executable: ./tool (macOS)zsh: bad CPU type in …Volume fa…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.