How to Securely Erase Free Space from the Terminal on Mac OS X

Launch Terminal and type one of the following commands:

to erase free space in a single pass
diskutil secureErase freespace 0 /Volumes/Macintosh\ HD

to erase in a single pass using random data
diskutil secureErase freespace 1 /Volumes/Macintosh\ HD

to erase free space in 7 passes
diskutil secureErase freespace 2 /Volumes/Macintosh\ HD

to erase free space in 35 passes using the Gutmann algorithm
diskutil secureErase freespace 3 /Volumes/Macintosh\ HD

and to erase free space in 3 passes using the US DoE algorithm
diskutil secureErase freespace 4 /Volumes/Macintosh\ HD

Enjoy!

Leave a Comment

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

Scroll to Top