# Retiring a drive or PC: wipe it properly before it leaves

> Which wipe method matches the medium, how BitLocker changes the calculus, and the checks before selling or recycling a Windows machine.

**Tested on**

- Build: 26300.9457 / 26100.33650
- Edition: Pro (26H2) / Server
- Architecture: x64
- Evidence: E1
- Verified: 2026-10-29

## The short answer

The right wipe depends on the medium and on who gets the device:

| Target | Method |
|---|---|
| **SSD (SATA/NVMe)** | ATA/NVMe **secure erase** (vendor tool) or crypto-erase |
| **HDD** | overwrite with random data, at least one full pass |
| **Encrypted drive (BitLocker)** | destroy the key — a crypto-erase — then format |
| **Phone/tablet** | factory reset with encryption enabled |
| **Whole PC, resold** | wipe the disk **and** reset firmware/TPM state |

A single "quick format" is not a wipe. It removes the file table and leaves the data.

## SSD: overwriting is not enough

On flash, overwriting does not reliably reach every cell — wear levelling and spare blocks mean old data can persist outside the logical address space.

Use one of:

1. **Manufacturer secure-erase tool** (ATA Security Erase / NVMe Format with crypto erase) — fastest and most thorough.
2. **Crypto-erase** — if the drive was encrypted (BitLocker, Opal), destroying the key renders the data unreadable even if the ciphertext remains.
3. **Full overwrite as a fallback** — `cipher /w` or a third-party tool; slower and weaker than secure erase, but better than a format.

```powershell
# check whether the volume is encrypted before you start
manage-bde -status C:
# overwrite free space (not the whole disk) - a fallback, not a secure erase
cipher /w:C:\
```

`cipher /w` writes to free space only; it does not touch existing files. It is useful **after** deleting data, not instead of a wipe.

## HDD: overwrite properly

One full pass of random data is enough for any realistic threat model. More passes are superstition for modern densities.

```powershell
# destructive: this erases the whole disk
Clear-Disk -Number 1 -RemoveData -RemoveOEM -Confirm:$false
```

`Clear-Disk` removes partitions and data structures; it does **not** overwrite the whole surface. For a true wipe, use a dedicated tool that writes every sector.

> **Danger: Double-check the disk number before Clear-Disk**
>
> `Clear-Disk -Number N` destroys the wrong disk just as thoroughly as the right one. Run `Get-Disk` and confirm the model and size, then re-run the command with the number you verified. There is no undo.

## The crypto-erase shortcut

If the drive was **fully encrypted** with BitLocker (or is a self-encrypting Opal drive with BitLocker managing the key):

1. Confirm encryption covered the whole volume (`manage-bde -status`).
2. Destroy the key — clear the TPM, delete the recovery key, or run the vendor's crypto-erase.
3. The remaining ciphertext is useless without the key.

This is the standard approach for SSDs in managed fleets: fast, and it does not wear the drive.

Caveat: if the drive was only **partially** encrypted, or "used space only", unencrypted leftovers may remain.

## Whole-machine checklist before it leaves

1. **Sign out of accounts** — Microsoft account, Entra join (`dsregcmd /status` should show not joined).
2. **Remove the device from management** — Autopilot/Intune/MDM; otherwise the next owner cannot complete OOBE.
3. **Wipe every drive**, including secondary and any SD card.
4. **Reset firmware** — clear TPM, reset BIOS/UEFI to defaults, remove BIOS passwords.
5. **Check for hidden storage** — eMMC, Optane modules, USB drives left inside.
6. **Clean externally** and note any faults honestly.

```powershell
Get-Disk | Select-Object Number,FriendlyName,Size,BusType
Get-PhysicalDisk | Select-Object FriendlyName,MediaType,Size,HealthStatus
dsregcmd /status
Get-Tpm | Select-Object TpmPresent,TpmReady
```

## What not to do

- **Do not rely on "Reset this PC"** alone — it can keep files with the "keep my files" option, and its wipe is not a secure erase.
- **Do not sell a drive that held credentials** without a crypto-erase or secure erase.
- **Do not bin lithium batteries** — take them to e-waste.

## Related

- [BitLocker and hardware encryption](https://windows.homes/en/hardware/storage/bitlocker-hardware-encryption/)
- [Drive health and SMART](https://windows.homes/en/hardware/storage/health-smart/)
- [Repair or replace](https://windows.homes/en/hardware/diag/lifecycle-replace/)

## Lab boundary

E1. The commands and BitLocker behaviour are Microsoft-documented. No drive was wiped for this page; the destructive commands are described, not executed here.

## Sources

- [Microsoft Learn — Clear-Disk](https://learn.microsoft.com/en-us/powershell/module/storage/clear-disk)
- [Microsoft Learn — cipher](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/cipher)
- [Microsoft Learn — BitLocker overview](https://learn.microsoft.com/en-us/windows/security/operating-system-security/data-protection/bitlocker/)

---

Source: https://windows.homes/en/hardware/diag/retire-wipe/
