How to wipe a USB stick, hard drive or SSD before you sell it or give it away
Deleting the files and doing a quick format feels like enough. It isn't: a quick format only throws away the index, and free recovery tools can often bring most of the files back.
Why a quick format isn't a wipe
A file system keeps a list of where each file lives. A quick format writes a fresh, empty list and leaves the old data where it was, marked as free space. Until something overwrites it, recovery tools can read it straight off the drive. Deleting files works the same way. That's handy when you delete something by mistake, and bad news when you're handing the drive to a stranger.
Pick the method by drive type
| Drive | Good enough | Best |
|---|---|---|
| Spinning hard drive (HDD) | Full format (untick Quick format), which overwrites every sector with zeros | Same: one pass is enough on modern drives. Multiple passes are a myth from very old drives. |
| Internal SSD (SATA or NVMe) | Encrypt the whole drive (BitLocker or FileVault), then reset or erase | The drive's own secure erase or sanitize command, from the maker's tool or the BIOS |
| USB stick or SD card | Overwrite the whole thing once (full format or clean all) | Encrypt first (BitLocker To Go or APFS encrypted), then full format |
| External SSD | Encrypt, then full format | The maker's secure erase tool if it has one |
| Phone or tablet | Built-in factory reset (modern phones are encrypted, so a reset makes old data unreadable) | Same, after signing out of the phone's account so it isn't locked to you |
Why SSDs and sticks are different
Flash drives move data around to spread wear, and keep spare memory you can't see. When you overwrite a file, the new data often lands somewhere else and the old copy stays in a cell the drive has set aside. So overwriting from the computer can't promise to hit everything. Secure erase works inside the drive and resets every cell, including the hidden ones. Encryption works because whatever the drive keeps is scrambled, and the key goes when you erase.
Windows
- USB stick, SD card or external drive: File Explorer, right-click the drive, Format, untick Quick Format, Start. This writes zeros over every sector, so it takes a while (roughly 1-3 hours per TB on a hard drive).
- Whole disk including partitions: run
diskpartas administrator, thenlist disk,select disk N(check the size carefully),clean all. Then create a new volume in Disk Management. - Encrypt first: right-click the drive, Turn on BitLocker (Pro editions), let it encrypt the whole drive, then format it. On Home editions, the stick can be encrypted with a free tool such as VeraCrypt.
- Selling the PC: Settings, System, Recovery, Reset this PC, Remove everything, and choose Clean the drive (Windows 10: Change settings, Data erasure On).
Mac
- Selling the Mac (Apple silicon or T2 chip): System Settings, General, Transfer or Reset, Erase All Content and Settings. The internal drive is always encrypted, so this throws away the key in seconds.
- External drive or stick: Disk Utility, View, Show All Devices, pick the drive itself, Erase. For a hard drive, Security Options lets you write one pass of zeros. For a stick or SSD, erase it as APFS (Encrypted) first, then erase again in the format you want to hand over.
Linux
Check the device name with lsblk first: writing to the wrong one erases it. For a hard drive or stick, sudo dd if=/dev/zero of=/dev/sdX bs=4M status=progress overwrites every byte. For an SSD, sudo blkdiscard -s /dev/sdX or sudo nvme format /dev/nvme0n1 --ses=1 asks the drive to erase itself (support varies by drive). shred on single files isn't reliable on SSDs or journaling file systems.
Check it worked
Plug the wiped drive in and run a free recovery tool on it (PhotoRec, for example). If it finds nothing but empty space, nobody else will either.
When to just destroy it
A drive that clicks, won't power up or won't erase can't be wiped from software. If it held anything sensitive, keep it, or physically destroy the platters or memory chips (drill through the platters or the chips) rather than passing it on.
Related
Upgrading? Clone to the SSD first · Stick is write-protected and won't wipe · Check a drive's health first · New SSD not showing up in Windows · External hard drive clicking or beeping · Which format for a USB stick · Interactive: where do deleted files go? (Wirebook)
Questions
Does formatting a drive delete everything?
A quick format doesn't: it only writes a new empty file list, and recovery tools can often get the old files back. A full format (Quick Format unticked) overwrites the whole drive with zeros.
How many passes do I need to wipe a hard drive?
One. A single pass of zeros defeats normal recovery on modern hard drives. The idea that you need many passes comes from drives decades old.
How do I securely wipe an SSD?
Use the drive's built-in secure erase from the maker's tool or the BIOS, or the Mac's Erase All Content and Settings. Encrypting the whole drive first and then erasing it also works.
Is a USB stick safe after a full format?
A full format overwrites what the computer can reach, which stops ordinary recovery tools. For sensitive data, encrypt the stick first and then format it, so anything left in hidden spare memory is unreadable.
How do I wipe a laptop before selling it?
Windows: Reset this PC, Remove everything, Clean the drive. Mac: Erase All Content and Settings. Sign out of your accounts first so the buyer isn't locked out.
Published .