Wiping a Device Before You Sell or Recycle It
Back up, sign out and erase phones, computers, drives and routers properly so the next owner gets hardware and none of your data.
Key takeaways
- Back up and verify first, because a proper erase is meant to be irreversible.
- Sign out of platform accounts and turn off activation locks before erasing, or the next owner may be unable to use the device.
- On encrypted devices, the built-in factory reset destroys the keys, which makes old data unreadable.
- Solid-state drives need their own sanitize or secure erase functions, since overwriting files doesn't reliably reach every cell.
- Remember removable cards, SIMs, routers, printers and cloud records, which hold data too.
To wipe a device safely, do things in this order: back up what you want to keep, sign out of your accounts and remove the device from them, run the built-in erase function that destroys the data (not just a quick delete), and confirm that it starts up at the welcome screen. For drives pulled from computers, use a method suited to the type of storage, or physically destroy them.
Deleting files or doing a quick format leaves much of the data recoverable. A proper erase takes a bit longer and saves you from handing a stranger your photos, saved passwords and tax records.
Why deleting isn't enough
When you delete a file, the system usually just marks its space as available. The contents remain until something overwrites them. A quick format does much the same for a whole drive. Freely available recovery software can often bring such data back.
There are two sound approaches. One is to overwrite the data. The other, called cryptographic erase, applies to encrypted storage: destroy the encryption key, and what's left is indistinguishable from random bytes. NIST's media sanitization guidance, SP 800-88, describes levels of sanitization as clear, purge and destroy, which is a useful way to match effort to sensitivity.
Before you erase anything
Work through this list while the device still works.
- Back up photos, documents, messages, notes and app data. Open a few files in the backup to be sure.
- Move your authenticator. Transfer authenticator apps and any passkeys or security registrations to the new device, and confirm you can sign in with them.
- Collect licenses. Deactivate software that limits the number of installations.
- Unpair accessories such as watches, which may need to be removed from the old phone first.
- Remove payment cards from the wallet if the platform doesn't do it automatically.
- Check financing and ownership. A phone still under a payment plan, or a work-owned laptop, may not be yours to sell.
If the device belongs to an employer or school, return it to them. They have their own process and may need it to remain enrolled.
Phones and tablets
Menu names vary by version.
iPhone and iPad. Sign out of your Apple account (which turns off Find My for the device), then use "Erase All Content and Settings" under the general reset options. Newer Apple devices erase by discarding encryption keys.
Android. Remove your Google account and any maker account, then use "Factory reset" or "Erase all data". Removing the accounts first matters because factory reset protection can otherwise ask the next owner for your credentials. Check that the device is encrypted, which current phones are by default.
Afterward, take out the SIM card. If you used an eSIM, decide whether to transfer or delete it; ask your carrier if you're unsure, because deleting it may require a new activation code. Remove any microSD card and either keep it or erase it separately.
Computers
Windows. Use "Reset this PC" in the recovery settings, choose to remove everything, and pick the option to clean the drive where offered. If BitLocker or device encryption has been on, old data is already protected, and the reset discards the keys. Sign out of apps first and remove the PC from your Microsoft account's device list.
macOS. Recent versions include "Erase All Content and Settings" on Macs with Apple silicon or a T2 security chip. On older models, use Recovery mode to erase the disk with Disk Utility and reinstall macOS. Sign out of your Apple account and disable Find My.
Linux. You can reinstall with full-disk encryption on a fresh volume after sanitizing the drive, or hand over the machine with the drive wiped. For a LUKS volume, cryptsetup luksErase removes the key slots, which makes the contents unrecoverable if no header backup exists.
lsblk
sudo cryptsetup luksErase /dev/sdX2 Replace /dev/sdX2 with the right partition. Check it with lsblk several times, because there's no undo.
Standalone drives
Match the method to the storage.
| Storage | Recommended approach | Why |
|---|---|---|
| Hard disk (spinning) | One full overwrite, or the drive's secure erase | Overwriting reaches the platters reliably |
| SATA or NVMe SSD | The maker's tool or the drive's sanitize command | Wear leveling hides spare cells from overwriting |
| USB sticks and memory cards | Encrypt before use, or destroy | Erase support is limited and inconsistent |
| Self-encrypting drive | Cryptographic erase | Destroying the key is fast and complete |
| Dead drive | Physical destruction | Software can't reach it |
Many solid-state drive makers supply utilities that issue secure erase or sanitize commands, and some computer firmware setups include the same function. Multiple overwrite passes add wear without much benefit on modern drives. If the data was highly sensitive, destroying the drive is the clearest answer; use a service that provides a record, and don't try methods that risk injury, such as burning.
Routers, printers, TVs and cars
These keep more than you might think.
- Routers store Wi-Fi passwords, logs and sometimes ISP credentials. Run a factory reset and remove the unit from any cloud app.
- Printers and scanners may keep network settings, address books and, on office models, an internal drive with copies of documents.
- Smart TVs and consoles are signed into streaming and store accounts. Sign out, deactivate, then reset.
- Smart home gadgets should be removed from the app and reset; see securing smart home devices.
- Cars can hold paired phones, contacts, garage codes and home addresses. Use the infotainment system's reset and unlink the vehicle from the maker's app.
Don't forget the account side
Erasing the hardware doesn't remove its traces from services. Visit your platform and important accounts and remove the old device from trusted devices, signed-in sessions and backup lists. If you won't reuse the device's cloud backup, delete it once you're certain you have the data elsewhere.
Check your work
After the reset, the device should start at a first-run screen asking for language or region. Walk a few steps into setup. If it asks for your old account or shows your organization's name, it's still linked: sign in to the account or ask the administrator to release it, then erase again. Stop before connecting your own accounts, and power it off.
For a drive you overwrote, a quick check with a disk tool should show no partitions or files, or only the fresh ones you created. A recovery tool run against your own drive is a reasonable sanity check if you want it, although finding nothing with one tool doesn't prove that a flash drive's hidden cells are empty. That's why encryption or destruction is preferable for flash storage that held anything important.
Businesses should keep a simple record for each retired item: serial number, date, method, who did it and where the hardware went. Auditors and insurers may ask, and a disposal vendor's certificate belongs in the same file.
Start protecting the next device early
The easiest wipe is one you prepared for on the first day. Turn on full-disk encryption when you set up a computer, and keep sensitive files off removable cards that aren't encrypted. Then, years later, the reset only has to discard keys. It also protects you if the device is lost before you ever get to sell it, or if it fails so completely that you can't run an erase at all.
Keep a note of which accounts each device is signed into. When disposal day comes, the list tells you what to unlink and nothing gets left behind.
Selling, donating or recycling
For resale, include accessories you've checked, and don't hand over until you've seen the setup screen with no account request. Take payment in a way that protects you; marketplace scams lists common tricks.
For donation, ask the charity how it sanitizes devices, but wipe yourself first anyway. For recycling, use a certified e-waste program or a retailer or municipal collection point. Batteries need proper handling, and swollen ones need extra care; follow local guidance.
What can go wrong
The most frequent problem is an activation lock left in place. If a buyer reports it, sign in to your account from the web and remove the device. Another is wiping before checking the backup and discovering that photos only existed on the phone. A third is erasing the wrong drive, so disconnect other disks before running destructive tools.
If you can't unlock a device, such as a relative's old phone, you may still be able to reset it through recovery mode, but activation protection will remain tied to the original account. Makers generally require proof of ownership to remove it.
Common questions
Is a factory reset enough?
On a current, encrypted phone or computer, the built-in erase is generally sufficient for ordinary resale. Older unencrypted devices need an overwrite or encryption before the reset.
Should I keep the hard drive and sell the computer without it?
That works if the drive is removable, and it's a fair choice for sensitive data. Tell the buyer clearly, and note that many laptops have storage soldered to the board.