Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Last active May 22, 2018 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xeoncross/b76873e15537637d9fa345d57e965c03 to your computer and use it in GitHub Desktop.
Save xeoncross/b76873e15537637d9fa345d57e965c03 to your computer and use it in GitHub Desktop.
Securely erase a mac hard drive using diskutil from the command line. If this is the system disk, you probably will need to boot into recovery mode or use a USB stick installer.
# Shows which disks are which
mount
# diskutil secureErase [level] /dev/disk1s1
# 0 = one pass writing zeros
diskutil secureErase freespace 0 /dev/disk1s1
# https://ss64.com/osx/diskutil.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment