Page 1 of 1

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!

macOS - Fix device ...
Clear all

macOS - Fix device cannot be ejected because it is in use ...

1 Posts
1 Users
Famed Member Admin
Joined: 10 years ago
Posts: 2507
Topic starter  

Sometimes I run into this issue; I'm trying to eject an SD card or USB stick, but my Mac just keeps telling me its in use and cannot be ejected ...
Messages like:

  • The volume can't be ejected because it's currently in use.
  • The disk "SomeUSBDisk" wasn't ejected because one or more programs may be using it.
  • umount(/Volumes/SomeUSBDisk): Resource busy

Of course none of this is helpful ... what the heck is locking my device?

To find out, we can use disktutil.
In this example I'll try to eject /Volumes/SomeUSBDisk (replace "SomeUSBDisk" with the volume of the disk you're trying to eject).
The output is just an example, on your system this may be another process or application.

sudo diskutil unmount /Volumes/SomeUSBDisk

The output could look like this:

$ sudo diskutil unmount /Volumes/SomeUSBDisk


Volume SomeUSBDisk on disk2s1 failed to unmount: dissented by PID 326 (/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mds_stores)


What we learn here is that our disk is locked by process 326 (PID 326). It even lists that this is the mds_stores tool.

If this is an application, then close it nicely. As an alternative you can try to kill it from the command line

sudo kill [PID]

or force kill it - be careful though, this is not recommended unless you know what you're doing.

sudo kill -9 [PID]


$ sudo kill -9 326

$ sudo diskutil unmount /Volumes/SomeUSBDisk 
Volume SomeUSBDisk on disk2s1 unmounted


 You disk can now be ejected ...


Like what you see and you'd like to help out? 

The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:

- Do your shopping at Amazon, it will not cost you anything extra but may generate a small commission for us,
- send a cup of coffee through PayPal ($5, $10, $20, or custom amount),
- become a Patreon,
- donate BitCoin (BTC), or BitCoinCash (BCH).