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?

Screen Shot 2018-02-26 at 5.37.52 PM

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:

Screen Shot 2018-02-26 at 5.46.23 PM

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

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)

Screen Shot 2018-02-26 at 5.51.46 PM

  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.

Screen Shot 2018-02-26 at 5.56.14 PM

That’s it. Congratulations!

Let me know if this was helpful in the comments.

8 thoughts on “How to Erase a USB on Mac OSX That Won’t Mount

  1. TY! I tried the above (as well as others) and I get this error:

    Started erase on disk1
    Unmounting disk
    Error: -69877: Couldn’t open device

    keep getting that error. This is a FW external G-tech drive that always worked as backup.

      1. Thank you Nick… want a good laugh? I was using a power pack plus that was rated at a lower amperages than the G-drive was rated… I have so many orphaned power adapters. so I found what I thought was the right one. it worked for a while, then it stopped.. checked again.. yet again the wrong average amount… I was so paranoid abut polarity I hadn’t checked the amperage.. FINALLY found the right adapter, the drive worked flawlessly!

        thanks for the help!

  2. Hi, Nick.

    Tried doing this but I keep getting “Unable to write to the last block of the device”.

    Would really appreciate the help.

    Thanks heaps.

    Mark

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.