In El Capitan, in the Disk Utility app, I cannot find the option to rewrite bogus data (zeros or ones) across the entire drive multiple times.

I am using a spinning rust platter disk, not an SSD.

Some googling talks about doing this via command-line tools, and imply the feature has been removed from the Disk Utility app.

But the Disk Utility Help window includes step # 4 on the Erase a volume:

To prevent the erased files from being recovered, click Security Options, use the slider to choose how many times to write over the erased data, then click OK.

Where can I find that slider?


The secure erase feature indeed seems to be gone (or it's a bug).

Open Terminal and enter diskutil list to see a list of your attached drives. In the following example, notice a pair of drives are identified: /dev/disk0 (internal) and /dev/disk2 (external) - disk1 is related with the Apple CoreStorage partition disk0s2.

your_prompt_here% diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Mars                    999.7 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Mars                   +999.3 GB   disk1
                                 Logical Volume on disk0s2
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS parallels_bu            999.9 GB   disk2s2

Unmount the disk you want to erase with (below I assume the disk idenitifer is disk2:

diskutil umountDisk /dev/disk2

Then erase the disk with:

diskutil secureErase level /dev/disk2

…where you replace that word level with one of the following:

0 - Single-pass zeros.  
1 - Single-pass random numbers.  
2 - US DoD 7-pass secure erase.  
3 - Gutmann algorithm 35-pass secure erase.  
4 - US DoE 3-pass secure erase.  

Level 0 should be sufficient to rewrite bogus data or map out bad blocks.

If you want to erase the free space on a volume use:

diskutil secureErase freespace level /dev/diskXsY

Ceterum autem censeo Disk Utility 15 esse delendam.

  • Is there some way to interrupt the erasure? – Basil Bourque May 25 '16 at 4:54
  • @BasilBourque Interruption can be performed by Ctrl-C, the default stop-signal. However, whatever has been erased has been erased and is no longer retrievable. – perhapsmaybeharry May 25 '16 at 8:58

It is, in fact, not gone as mentioned by Klanomath.

To securely erase a disk, select the physical volume (no indentation on the sidebar list), select "Erase" from the toolbar and an option for "Security Options..." should be there.

Within the menu, there is a slider that allows you to choose between one pass, three passes, seven passes and 35 passes.

This "security options" menu is not available if you select any logical volume (indented).

However, should you wish to perform such operations from the command line, Klanomath's answer is a very comprehensive guide on how to do so.

  • Before posting my answer I have tested it in a VM. I tried to erase the disk device as well as the volume but I didn't get the Security Options... dialog. The internal virtual drives are all "SSDs" though. Maybe the option is not shown for SSDs!? – klanomath May 25 '16 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .