How to Erase a USB on Mac OSX That Won't Mount

Are you trying to erase a USB drive on your mac but getting this error as soon as you insert it?

the disk you inserted was not readable by this computer

That might be because the disk is a Windows/Linux bootable formatted as FAT-32, which OSX cannot read.

And then when you try to erase in disk utility, the USB is greyed out and First Aid doesn’t work, you can’t repair it, and you can’t mount or unmount it.

You get this error, and the details vary depending on the format type you try

macos disk utility erase process has failed

I was getting things like: “could not modify partition map” and “couldn’t unmount disk.” Other things could be things like “couldn’t open device.”

Erasing an External USB or Hard Drive that keeps failing in Disk Utility Link to heading

Thankfully I ended up fixing it quickly (with a little googleing).

Here’s what you do:

(note: be EXTREMELY careful, ask you could wipe your computer if you do this wrong)

macos diskutil list

  1. Open terminal
  2. Run the command: diskutil list
  3. Determine which disk is the external
  4. Type this very carefully (sudo might not be necessary): sudo diskutil unmountDisk force /dev/disk2
  5. Then this: diskutil erasedisk {format type} {desired name} {disk identifier}
    1. Where {format type} could be HFS+ or MS-DOS or others
    2. Where {desired name} is what you want to call this disk (you can easily change it later by reformatting again via Disk Utility)
    3. And {disk identifier} is the ID of your disk. DO NOT MESS THIS UP.

And the result: Finished erase!

macos finished erase on disk

That’s it. Congratulations!

Let me know if this was helpful in the comments.