Site TIPS PAGE🔎   UP ONE LEVEL
 OJB's Site. v2.4.L: tip52 tips mac owen2 
Tip

Discuss   Up to OJB's Mac Tips List

Secure Erase from El Capitan

The secure erase free space feature has been removed form Disk Utility in El Capitan (10.11) and later because it isn't useful for SSDs. It can still be accessed from the command line, like this...

diskutil secureErase freespace

Where "level" is a number from 0 to 4 indicating the type of erasing to do...
0 = Single pass zero fill erase.
1 = Single pass random fill erase.
2 = US DoD 7 pass secure erase.
3 = Gutmann algorithm 35 pass secure erase.
4 = US DoE algorithm 3 pass secure erase.

And "drivename" is the path to the drive, like /Volumes/Macintosh\ HD. Note the escaping of the space in the drive name above. You can see the mounted disks using the distil list command.

IMPORTANT: Don't forget the "freespace" option to make sure the whole disk isn't erased!

Related Tips

Secure Erase Options
Secure Erase SSD
Erase a Disk from Terminal





My latest blog post: Think for Yourself: In the end, everything is just an opinion. Be skeptical, and think for yourself! (posted 2026-04-25).

My latest podcast: OJB's Podcast 2026-04-14 How Far is that Star?

If you're not sure what to view from my site, here are some suggestions: My Latest Airshow Report, My Favourite Wines and Beers, An Interesting Astronomical Observation, See Some Photos, Read Some Mac Tips.


Site News (Mobile): OJB's web site, v 2.4 which has major changes, and possibly errors! Please report anything to ojb@mac.com.