Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kabacs/302a50b00ce19a3fd8e22594edb679b8 to your computer and use it in GitHub Desktop.
Save kabacs/302a50b00ce19a3fd8e22594edb679b8 to your computer and use it in GitHub Desktop.
Repairing damaged external drive (flash drive) on OS X
# If "Disk Utility" can't erase a demaged disk and throw errors, like these:
# a) "-69888: Couldn't unmount disk";
# b) "Couldn't modify partition map".
# You can repair disk (if it is damaged partially, just by a program error, while changing partition map of a disk in) by
# FULL ERASING OF A DISK - you can do that ONLY in A COMMAND LINE, using "diskutil" command (on OS X)
# 1. Firstly you must get path of a drive in a system, like this:
diskutil list
# Than complete erasing of a disk:
diskutil eraseDisk free EMPTY /dev/disk4
# where "/dev/disk4" is a disk path, gotten on a previous step!
#For more information, you can look to the source of a method: https://discussions.apple.com/thread/8132218
@yashkumaratri
Copy link

This helped a lot (nothing else worked). Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment