Skip to content

Instantly share code, notes, and snippets.

Last active February 10, 2018 18:26
What would you like to do?
Overwrite the macOS disk partition table and re-partition over encrypted data without causing excessive wear by explicitly erasing the full SSD
# Replace N in diskN with the disk number of your choice
# Use "diskutil list" to confirm, and ALWAYS back up your data
dd if=/dev/zero of=/dev/diskN bs=512 count=1
diskutil partitionDisk /dev/diskN 1 GPT APFS "Macintosh HD" 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment