Securely erasing disks in MacOS

Steps to Securely Erase in Disk Utility

  1. Open Disk Utility (found in /Applications/Utilities/).
  2. Choose View > Show All Devices to ensure you select the physical drive, not just the volume.
  3. Select the drive you want to erase.
  4. Click the Erase button in the toolbar.
  5. Click Security Options and move the slider to choose how many times to overwrite the data.
    • Fastest: Standard erase, no secure overwrite.
    • Single-pass (0): Writes zeros over the drive.
    • 3-Pass (4): DOE-compliant 3-pass overwrite.
    • 7-Pass (2): DoD 5220.22 M standard.
  6. Select a format (e.g., APFS or Mac OS Extended) and click Erase

Secure Erase Using Terminal 

  1. Identify the disk: diskutil list.
  2. Run the command: sudo diskutil secureErase [level] /dev/diskX.
    • Level 0: Single-pass zeros.
    • Level 1: Single-pass random.
    • Level 2: 7-pass secure erase.
    • Level 3: Gutmann algorithm (35-pass).
    • Level 4: 3-pass secure erase.

Important Notes

  • SSDs: Secure erase options are not necessary for most modern SSDs with TRIM enabled, as a standard erase is sufficient. Using多-pass overwrites on SSDs causes unnecessary wear.
  • FileVault: If your drive is encrypted with FileVault, simply erasing it (“Erase All Content and Settings” on modern Macs) destroys the encryption key, making the data unrecoverable.
  • Warnings: Secure erasure can take a long time. Ensure you have backed up any data you wish to keep.