
To wipe all data from a computer before selling it, back up the files you need, sign out of your accounts, and run a Windows reset with the "Remove everything" option and data cleaning. Simply deleting files and doing a quick format isn't enough.
Why deleting and formatting aren't enough
When you delete a file, the system frees up its space but doesn't overwrite the contents. Until something is written over that space, the file can be recovered with recovery software. The clean command in diskpart also only removes partitions or formatting. Writing zeros to every sector takes clean all.
Microsoft explicitly notes that the data cleaning feature in reset is meant for everyday users and doesn't meet government or industry standards. For a regular sale, Microsoft suggests this exact route. For a drive that held contracts or bank statements, use a separate wiping tool.
| Method | What happens | What it's for |
|---|---|---|
| Delete and Recycle Bin | Space is freed up, data remains | Not suitable |
clean in diskpart | Partitions or formatting are removed | Not suitable |
| Reset with "Remove everything" | Files, apps, and settings are removed | Selling a laptop |
| Reset with "Clean data" | Files are removed, the drive is cleaned | Selling or giving away |
clean all in diskpart | Zeros in every sector of the drive | HDD |
| SSD manufacturer utility | All storage cells on the drive are erased | SSD of the same brand |
What to do before wiping
Copy the files you need to an external drive and open the copy on another device. How to do that is described in the article on making a backup.
Sign out of cloud accounts, messaging apps, and synced browsers. Sign out of programs tied to an active license.
Disconnect external drives and USB flash drives so the reset or diskpart won't touch them by mistake.
Connect the laptop to its charger. Shutting down in the middle of a reset can leave Windows unusable.

How to wipe all data from a computer using Windows tools
In Windows 11, open Settings, select System, then Recovery, and click "Reset PC". In Windows 10, the path is different: Start, Settings, Update & Security, Recovery, then under "Reset this PC", click "Get started".
Select "Remove everything". The "Keep my files" option leaves documents behind, and you don't need them when selling.
Choose "Cloud download" or "Local reinstall". The cloud option installs a fresh copy of Windows; the local one is faster if your internet is slow.
Under additional settings, turn on "Clean data". The setting name varies slightly across builds, so look for words like "clean" or "clean the drive".
Wait for the initial Windows setup screen and shut down the laptop without signing into an account.
If the laptop is encrypted with BitLocker, Windows may ask for the key during a reset from the recovery environment. Where to find it is explained in the article on BitLocker. The reset process itself and its errors are covered in the article on factory reset.
How to wipe an HDD: diskpart and clean all
You can't wipe the system drive from the Windows running on it. The commands below are run from the Command Prompt in the Windows installation environment or from another computer the drive is connected to. Before clean all, make sure you've selected the right drive: check the size.
Enter
diskpart, thenlist disk. Find the drive by size in the list.Enter
select disk 1, substituting your drive number. After that, all commands apply to it.Enter
clean all. The command writes zeros to every sector, and on a large drive it takes a long time.Don't interrupt the process. Once it's done, the drive is empty and has no partitions.

How to wipe an SSD and what to do with encryption
For an SSD, clean all writes across the entire capacity for a long time and doesn't use the command built into the drive itself. Manufacturers provide their own utilities. For Samsung, it's Secure Erase in the Magician software: it creates a bootable flash drive to wipe all SSD cells. To run it, disable RAPID mode in Magician, and AHCI mode is needed in BIOS.
Other manufacturers have their own utilities; look for them on the support page for your model. The general rule is the same: a data backup before starting, the right drive, and no interruptions.
What to do with accounts and Mac
Microsoft recommends removing the device from your Microsoft account after the reset. Go to account.microsoft.com/devices, find the laptop, open its info, and select remove under more actions. Check the confirmation box and confirm the removal.
On a Mac with Apple silicon or a T2 chip and macOS Monterey 12 or later, there's an Erase All Content and Settings option. Before using it, sign out of your Apple account: in macOS Ventura 13 and later, that's System Settings, your name in the sidebar, and the Sign Out button. Reinstalling macOS is covered in the article on reinstall macOS.

Before handing over the laptop
What you can do yourself
- Back up files and sign out of accounts
- Run the 'Remove everything' reset with data cleaning
- Wipe an HDD with the
clean allcommand
Better to call a technician
- The laptop won't turn on and the drive needs to be wiped
- There's important data on the drive or a full SSD wipe is needed
- You need a clean Windows install and setup after wiping
Frequently asked questions
- Is it enough to just format the drive?
- A quick format isn't enough: it removes the partition layout, but the data in the sectors remains. The
clean allcommand in diskpart writes zeros to all sectors, while SSDs have their own internal drive commands. - What should you do if the laptop won't turn on and the data needs to be wiped?
- You can remove the drive (shut down the laptop first and unplug the charger; opening the case may affect the manufacturer's warranty) and connect it to another computer using an adapter, then wipe it with the
clean allcommand after selecting the drive by size. If you don't want to open the case, a technician can wipe the drive. - Should you remove the device from your account before or after a reset?
- In its guide for selling a device, Microsoft recommends this order: back up files, reset, then remove the device on account.microsoft.com/devices.
- Is "Remove everything" enough for documents with banking details?
- Microsoft notes that data erasure during a reset doesn't meet government or industry standards. For a drive with confidential data, use a dedicated wipe or don't hand over the drive.


