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.

And the result: Finished erase!

Screen Shot 2018-02-26 at 5.56.14 PM

That’s it. Congratulations!

Let me know if this was helpful in the comments.

11 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

  3. I’ve tried to erase my external drive (disk2) using your article https://nickriebe.com/2018/02/27/erase-a-usb-on-mac-osx-that-wont-mount/
    I followed the instructions, here is my terminal transcript:

    MacBook-Pro:~ scott$ diskutil list
    /dev/disk0 (internal, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *500.3 GB disk0
    1: EFI EFI 209.7 MB disk0s1
    2: Apple_APFS Container disk1 500.1 GB disk0s2

    /dev/disk1 (synthesized):
    #: TYPE NAME SIZE IDENTIFIER
    0: APFS Container Scheme – +500.1 GB disk1
    Physical Store disk0s2
    1: APFS Volume Macintosh HD 305.9 GB disk1s1
    2: APFS Volume Preboot 27.3 MB disk1s2
    3: APFS Volume Recovery 515.0 MB disk1s3
    4: APFS Volume VM 1.1 GB disk1s4

    /dev/disk2 (external, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: *4.1 GB disk2

    MacBook-Pro:~ scott$ sudo diskutil unmountDisk force /dev/disk2
    Password:
    Sorry, try again.
    Password:
    Forced unmount of all volumes on disk2 was successful
    MacBook-Pro:~ scott$ diskutil erasedisk HFS+ seagate disk2
    Started erase on disk2
    Unmounting disk
    Creating the partition map
    Error: -69760: Unable to write to the last block of the device
    MacBook-Pro:~ scott$

    As you can see, I get another error message with error -69760.

    I’m stuck, any suggestions?

    Thanks,

    Scott

    1. Hi Scott – sorry this is happening to you!

      I took a quick read here, and some things suggested are: try another port, try another cable, or try another computer. Those are the only suggestions I have, as I’m not an expert…just someone who got it working for themselves and wanted to share.

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.