How To Erase An SSD Drive | Secure Wipe Methods

Properly wiping an SSD needs a Secure Erase or Sanitize command that resets all flash cells — a standard format leaves data recoverable due to wear-leveling.

Mistaking a quick format for a full wipe is how old data survives on a sold SSD — knowing how to erase an SSD drive the right way starts with understanding why standard tools can’t reach every flash cell. SSDs scatter data across physical blocks using wear-leveling, and over-provisioned areas often hide recoverable copies that a simple format leaves untouched. The real fix is a Secure Erase or Sanitize command that resets the drive’s entire flash array in one pass.

Why Can’t You Just Format An SSD?

A standard format only rewrites the file system table, telling the OS the drive is empty while the actual data remains on flash cells. Wear-leveling algorithms map data to physical blocks non-linearly, so data written to logical addresses may occupy entirely different cells than a format ever touches. Over-provisioned regions — spare blocks the controller manages — are invisible to standard write tools and can retain old data indefinitely.

Secure Erase (the ATA-8/ATA-9 standard for SATA drives) and NVMe Sanitize apply a voltage pulse across all cells simultaneously, returning them to their factory-empty state. No file-by-file overwrite; no gaps. Self-Encrypting Drives offer a shortcut — erase the encryption key and the data becomes unrecoverable regardless of what the flash cells still hold.

Erasing An SSD Drive: Start With The Manufacturer’s Tool

The most reliable method is the one your SSD maker built specifically for its own controller. Running the Secure Erase command from the manufacturer’s utility tells the drive’s internal firmware to handle the wipe internally, which is both faster and more thorough than any OS-level approach.

Samsung owners use Samsung Magician — under the Tools tab, select Secure Erase for the target drive. Crucial drives use Storage Executive, also with a dedicated Secure Erase option. Western Digital users open WD Dashboard to find the same function. All three tools run on Windows and require Administrator privileges. The process takes a few minutes and leaves the SSD in a fresh-out-of-box state.

The catch: this method only works when you know the brand and can download its tool. For drives of unknown origin, or when the manufacturer no longer supports the model, the BIOS or command-line routes below are the alternatives.

Erase From BIOS/UEFI

If your motherboard supports Secure Erase at the firmware level, you can wipe any SSD without booting an operating system. This is the cleanest option for a system drive you cannot erase from within the OS.

Restart the PC and press F2, Del, or F12 to enter the UEFI or BIOS setup. Look for a section named Storage, Security, or Maintenance — the label varies by motherboard maker. Select the connected SSD, choose Secure Erase, confirm the warning, and let it run. The drive will appear uninitialized on the next boot, ready for a fresh installation or disposal.

Not every BIOS includes this feature. If the menu option is missing, fall back to a manufacturer tool or the OS-level methods covered next.

Windows: diskpart And The Reset Option

Windows 10 and 11 include two built-in routes for erasing an SSD, each suited to a different situation.

For a secondary drive (not the one running Windows), the diskpart clean all command writes zeros to every accessible sector. Open Command Prompt as Administrator, type diskpart, then list disk to identify the target drive. Use select disk X (replace X with the correct number) and then clean all. This command can take hours on a large SSD because it writes to every sector — it is thorough but slow. The Tom’s Hardware guide on secure erasing SSDs shows the full sequence with visual references.

For the system drive you intend to reset and keep, use Settings > System > Recovery and choose Reset this PC. Select Remove everything, then click Change settings and toggle Clean data on. This ensures the reset overwrites the drive rather than just removing file pointers.

Both methods have the same limitation: on drives with heavy over-provisioning, some hidden cells may escape the overwrite. For maximum certainty on secondary drives, the manufacturer tool or BIOS Secure Erase is preferable.

Does macOS Have A Secure Erase Option?

Modern versions of macOS hide the granular security options that older Disk Utility versions offered. On APFS-formatted drives, the standard Erase command does not guarantee the underlying cells are reset. Two workarounds exist.

Option one — before erasing, enable FileVault (System Settings > Privacy & Security > FileVault) so the drive is encrypted. Reboot to Recovery Mode (Cmd+R at startup), open Disk Utility, unlock the volume with your password, then erase it. Removing the encryption key makes the data unreachable even if the flash layer was only partially reset.

Option two — open Disk Utility, click View > Show All Devices, select the top-level physical disk (not the volume below it), and click Erase. If Security Options appears, move the slider to the rightmost position to overwrite all data. On newer macOS builds this button is often missing, which means Option one is the reliable path.

Linux: hdparm And nvme-cli

Linux offers separate command paths for SATA and NVMe drives. Both run entirely from the terminal.

For SATA SSDs, install hdparm with sudo apt install hdparm. Check the drive is not frozen: sudo hdparm -I /dev/sdX | grep "not frozen". Set a temporary security password with sudo hdparm --user-master u --security-set-pass password /dev/sdX and then issue the erase: sudo hdparm --user-master u --security-erase password /dev/sdX. The drive resets in seconds regardless of its capacity.

For NVMe SSDs, install nvme-cli with sudo apt install nvme-cli. The fastest path is sudo nvme format /dev/nvme0n1 --ses=1, which triggers a Secure Erase at the NVMe controller level. For the even more thorough Sanitize operation, run sudo nvme sanitize /dev/nvme0n1 -a 2 (Block Erase action). Both commands take between a few seconds and a few minutes depending on the drive.

Terminal-based erasing carries no handholding — double-check the device name with lsblk before running any command against it. One wrong letter wipes the wrong disk.

SSD Erase Methods Compared

Method Best For Key Limitation
Manufacturer tool One-click reliability Requires knowing the brand and downloading the utility
BIOS/UEFI Secure Erase Erasing without an OS Not all motherboards include the feature
Windows diskpart clean all Built into every Windows 10/11 install Very slow on large drives; may not reach over-provisioned cells
Windows Reset This PC (clean data) System drive you are keeping Only works for the boot drive
macOS FileVault + Recovery erase APFS drives with no Security Options Requires pre-encryption before erasing
Linux hdparm (SATA) Full control, no bloat Terminal-only; easy to target the wrong device
Linux nvme-cli (NVMe) NVMe Sanitize support Requires separate package installation

Common Mistakes That Leave Data Behind

The most expensive error on this list is confusing a quick format with a secure erase. A format or a plain delete only clears the index — any data recovery tool can still pull files off the drive in minutes. SSDs make this worse because wear-leveling ensures deleted data is scattered and often partially intact in spare blocks.

Running a wipe on the wrong drive is the second. Physically disconnect every storage device except the target SSD before starting, or verify with list disk in diskpart and lsblk in Linux. The third common mistake is assuming the first method that pops up is thorough enough — standard dd overwrites on an SSD can miss over-provisioned space, giving a false sense of security.

Self-Encrypting Drives add a nuance: if the encryption key is not explicitly deleted, the data remains encrypted but recoverable by someone who obtains the key. Using a method that only resets the file table on an SED leaves the key intact and the data theoretically accessible.

OS-Specific Erase Commands At A Glance

OS Tool / Command Target Interface
Windows diskpart clean all SATA, NVMe (any visible drive)
Windows Reset this PC with “Clean data” System drive (boot disk)
macOS FileVault + Recovery Mode erase APFS system drives
Linux (SATA) hdparm --security-erase SATA SSDs via ATA Secure Erase
Linux (NVMe) nvme format --ses=1 NVMe SSDs via controller format
Linux (NVMe) nvme sanitize -a 2 NVMe SSDs via Sanitize Block Erase

Picking The Right Erase Method For Your SSD

Match your situation to one of these paths:

  • You know the brand — use its utility tool (Samsung Magician, Crucial Storage Executive, WD Dashboard). Fastest and most reliable.
  • You want to avoid booting into Windows — enter BIOS/UEFI and use the Secure Erase option if available.
  • You are on Windows and wiping a secondary drivediskpart clean all works but takes time; the manufacturer tool is better if you can use it.
  • You are resetting your Windows boot drive and keeping the PC — Reset this PC with “Clean data” enabled.
  • You are on a Mac — enable FileVault first, then erase from Recovery Mode. Skip the standard Disk Utility erase alone.
  • You are on Linuxhdparm for SATA drives, nvme format or nvme sanitize for NVMe drives.

Each method listed here is free except a few third-party boot tools (Parted Magic costs around $11 per year). No subscription is required for any of the OS-built-in or manufacturer routes. Stable power during the erase matters — a power loss mid-process can corrupt firmware on some drives, so run these operations on a laptop with a full charge or a desktop on a UPS.

References & Sources

Please use a real email you check. If it's fake or mistyped, your message won't reach us and we can't reply — wrong addresses are rejected automatically.