Site TIPS PAGE🔎 SEARCH  Ξ INDEX  MAIN MENU  UP ONE LEVEL
 OJB's Web Site. Version 2.1. Mac Tip.You are here: tip tips mac owen2 
Tip

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



I usually write a blog post about once a week. The latest post can be viewed here: Deontology vs Consequentialism: If we have free speech, personal freedom, equality, and truthfulness we are off to a pretty good start. (posted 2025-10-20 at 17:08:06).
Warning: mysqli_connect(): MySQL server has gone away in /Library/WebServer/Documents/Owen2/Inc/Footer.inc.php on line 59

Warning: mysqli_connect(): Error while reading greeting packet. PID=89102 in /Library/WebServer/Documents/Owen2/Inc/Footer.inc.php on line 59

Warning: mysqli_connect(): (HY000/2006): MySQL server has gone away in /Library/WebServer/Documents/Owen2/Inc/Footer.inc.php on line 59

Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in /Library/WebServer/Documents/Owen2/Inc/Footer.inc.php on line 60
Could not connect to MySQL: