How to wipe an SSD before selling it
An SSD does not erase the way a hard drive does. Deleting files, formatting the drive or running an overwrite tool can all leave data behind that a determined buyer could recover. What works is the erase command built into the drive itself, and there are four easy ways to run it.
Why deleting and formatting are not enough
An SSD spreads writes across all of its flash to even out wear, and it keeps spare flash that the computer never sees. When you delete a file or quick-format the drive, the data usually stays where it was until the drive gets round to clearing it. Overwrite tools written for hard drives, such as DBAN, write to the addresses the computer can see, but the drive decides where those writes land, so old copies in spare or remapped flash can survive.
The drive’s own erase command — Secure Erase on a SATA drive, Format or Sanitize on an NVMe drive — is carried out by the drive’s controller across all of its flash, spare areas included. On most drives it takes seconds to a few minutes. Every method below runs that command in one form or another.
1. The drive maker’s Secure Erase
The easiest route on Windows. Install your drive maker’s free utility and look for Secure Erase or Sanitize:
- Samsung: Samsung Magician
- Crucial: Crucial Storage Executive
- WD and SanDisk: WD Dashboard
- Kingston: Kingston SSD Manager
- Intel and Solidigm: Solidigm Storage Tool
- SK hynix: SK hynix Drive Manager
A tool cannot erase the drive Windows is running from, and a SATA drive is often “frozen” against erasing while the computer is on. For either case the utility usually offers to make a bootable USB stick that runs the erase outside Windows; follow its prompts. Erasing a second drive is normally a single click.
2. Secure Erase in the BIOS
Many desktop motherboards and most business laptops can erase a drive from the firmware setup screen, with nothing to install. Restart, enter setup (usually Delete, F2 or F10 as the computer starts) and look for an option named Secure Erase, Data Wipe or Secure Wipe, often under a Tools, Maintenance or Security menu. Dell, HP and Lenovo business machines all have one. It erases the whole drive, operating system included, so do it last.
3. Windows reset, for the system drive
If you are selling the whole computer, or putting the drive back in a machine you are keeping, the Windows reset with cleaning switched on is a reasonable choice for a home sale:
- Windows 11: Settings → System → Recovery → Reset PC. Windows 10: Settings → Update & Security → Recovery → Get started.
- Choose Remove everything, then under Additional settings choose Change settings and switch Clean data to Yes.
- When it reaches the first setup screen, shut it down.
This overwrites the free space rather than running the drive’s own erase, so a maker’s Secure Erase is the more thorough option when the drive is leaving you on its own. Our guide to wiping a whole PC covers signing out of accounts and the other steps around it.
4. Linux, for NVMe and SATA drives
From a Linux live USB you can send the erase command yourself. Check the device name twice with lsblk first — these commands erase the drive you name, immediately and permanently.
- NVMe: with the nvme-cli package,
nvme format /dev/nvme0n1 --ses=1runs a user-data erase. Where the drive supports it,nvme sanitize /dev/nvme0 -a 2runs a block-erase sanitize, which also clears caches and spare flash;nvme sanitize-log /dev/nvme0shows when it has finished. - SATA: with hdparm, confirm with
hdparm -I /dev/sdXthat the drive shows “not frozen” (suspending and waking the computer often unfreezes it), then set a temporary password and erase:hdparm --user-master u --security-set-pass p /dev/sdXfollowed byhdparm --user-master u --security-erase p /dev/sdX.
If the drive was encrypted
A drive that was protected by BitLocker, Device encryption or another full-disk encryption for its whole life holds nothing readable without its key, and erasing it destroys the key. It still costs nothing to run a Secure Erase as well. Turning encryption on only now helps less than it sounds: unless you choose to encrypt the entire drive, space that held deleted files is not encrypted.
If the drive has failed
A drive that will not show up cannot be erased by any of these methods. If it is going to RebootSemi, you do not need to do anything: a failed drive gets no offer, but sent in the same box as other parts it is physically destroyed and recycled, and a certificate of destruction is available on request. Working drives are securely wiped on arrival whether or not you wiped them first — but wipe yours anyway. You should never rely on someone else to remove your data.
Next: see how worn your drive is, or find out whether it is NVMe or SATA.