Skip to content

Wiping an external drive on a Mac before you sell it, give it away or recycle it

Erasing a drive in Disk Utility does not always make the old files unrecoverable. What works for hard drives, what works for SSDs, and how long each takes.

4 min read

A quick erase removes the file system, not always the data underneath. Someone with recovery software may still find old files. How to wipe properly depends on whether the drive is a hard drive or an SSD.

Hard drives

In Disk Utility, select the drive, click Erase, then Security Options. Move the slider one step towards Most Secure: a single pass of zeros is enough for modern hard drives. Each extra pass multiplies the time, which can already be hours for a large drive.

# The same, from Terminal: 0 is a single pass of zeros
diskutil secureErase 0 /dev/disk4

SSDs and USB sticks

Security Options are not offered for SSDs, because overwriting does not reliably reach every cell. The dependable method:

  1. Erase the drive as APFS (Encrypted) with a long random password.
  2. Erase it again, in whatever format the next owner needs.

The old data was only ever written under a key that no longer exists. If the drive was encrypted from the start, a normal erase is already enough. See encrypting an external drive.

Check the right drive

diskutil list external

For the Mac itself, see cleaning a Mac before selling.

Common questions

How do I securely erase an external hard drive on a Mac?

In Disk Utility, choose Erase, then Security Options, and pick a single pass of zeros. Or run diskutil secureErase 0 with the disk identifier.

Why is there no secure erase option for my SSD?

Overwriting does not reliably reach every cell of an SSD. Erase it once as APFS (Encrypted) with a random password, then erase it again normally.

Is a normal erase enough before giving away a drive?

For an encrypted drive, yes. For an unencrypted one, use a secure erase on a hard drive or the encrypt then erase method on an SSD.

Read next