How to Completely Wipe a Hard Drive in Windows 11 Before Selling – LicenceHouse guide

To wipe a hard drive in Windows 11 before selling, go to Settings > System > Recovery > Reset PC, choose Remove everything and switch Clean data to Yes. Windows then reinstalls itself and overwrites the old data so it is hard to recover. For spare drives, or for extra assurance, you can also use diskpart clean all, a full format with /p, or your SSD maker's secure erase tool.

The right method depends on whether the drive is the Windows system drive or a secondary disk, and whether it is a spinning hard disk (HDD) or a solid-state drive (SSD). The table below gives the short version.

Method Best for What it does Keeps Windows?
Reset this PC with Clean data Selling or giving away the whole PC Reinstalls Windows and overwrites old files Yes, fresh copy
diskpart then clean all Secondary HDDs, drives leaving the PC Writes zeros to every sector No, disk is left empty
format X: /p:1 A single data partition Zeros the volume, then one random pass Not for the Windows drive
cipher /w Clearing free space you have already deleted from Overwrites unused space only Yes, files untouched
Manufacturer secure erase SSDs and NVMe drives Asks the drive firmware to erase all cells No, disk is left empty

What should you do before wiping a drive you plan to sell?

Before wiping, back up everything you want to keep, sign out of your accounts, note any BitLocker recovery key, and check how your Windows licence is activated. A wipe is designed to be irreversible, so anything not copied elsewhere first is gone for good once the overwrite pass finishes.

Work through this short checklist first:

  1. Back up your files to an external drive or cloud storage, then open a few backed-up files to confirm they work.
  2. Export browser passwords and app data you rely on, such as authenticator backups or email archives.
  3. Deauthorise paid software that limits installations, for example creative suites or media stores.
  4. Check activation under Settings > System > Activation and note whether it says your digital licence is linked to your Microsoft account.
  5. Remove the PC from your Microsoft account at account.microsoft.com/devices after the wipe, so it no longer appears in your device list.

What we commonly see: people back up the Documents folder but forget the Desktop and Downloads folders, or files stored only inside an app. Take two minutes to check each of those before you start.

How do you completely wipe a hard drive in Windows 11 using Reset this PC?

Open Settings > System > Recovery, select Reset PC, choose Remove everything, then open Change settings and turn Clean data on. Windows overwrites your old data, reinstalls a clean copy of itself, and leaves the PC at the first-run setup screen ready for the new owner.

  1. Plug a laptop into mains power. The clean pass can take hours on a large hard disk.
  2. Press Win + I and go to System > Recovery.
  3. Next to Reset this PC, select Reset PC.
  4. Choose Remove everything.
  5. Pick Cloud download (fresh files from Microsoft) or Local reinstall (uses files already on the PC). Either works for a sale.
  6. On the Additional settings screen, select Change settings.
  7. Set Clean data? to Yes. If you see Delete files from all drives?, set it to Yes to include other partitions on the system disk.
  8. Select Confirm, then Next and Reset.
  9. When the PC reaches the region selection screen, shut it down there. Do not create an account; the buyer will do that.

Cause and effect: with Clean data left on No, Windows only quick-removes files, which is fast but leaves data that recovery tools can often find. Switching it to Yes is what turns a reset into a genuine wipe.

Microsoft's recovery options guide explains the reset alongside lighter repair tools. If the reset fails with a missing recovery environment error, you can also start it from a USB installer instead.

Open hard disk drive showing the platter and read arm, ready to wipe before selling a Windows 11 PC

How do you use diskpart clean all to wipe a whole disk?

Run diskpart as administrator, select the target disk, then type clean all. According to Microsoft, this sets every sector on the disk to zero, removing all partitions and data. It suits secondary hard drives, or a drive you have removed from a PC and connected by USB, but never the disk Windows is running from.

  1. Right-click Start and choose Terminal (Admin).
  2. Type diskpart and press Enter.
  3. Type list disk and identify the target by its size. Double-check this; choosing the wrong number erases the wrong drive.
  4. Type select disk 1, replacing 1 with your disk number.
  5. Type detail disk to confirm the model and volumes match what you expect.
  6. Type clean all and wait. Large hard disks can take many hours, and the window shows little progress.
  7. When it finishes, type exit. The disk is now empty and unallocated.

Advanced nuance: plain clean without all only overwrites the partition table, so the data underneath stays intact. Microsoft's diskpart clean reference documents the difference. If the buyer needs a usable drive, create a new partition afterwards in Disk Management.

What do format /p and cipher /w do?

A full format with /p:1 zeros every sector on one volume, then overwrites it once more with random data. cipher /w does something different: it overwrites only the free space on a volume, wiping traces of files you already deleted while leaving current files in place.

To wipe a single data partition, such as drive D:, run this from an administrator terminal:

  1. Type format D: /fs:ntfs /p:1 and press Enter.
  2. Confirm the drive letter when asked. Do not add /q, because Microsoft states that quick format overrides /p.

To clean free space on a drive you are keeping in use, run cipher /w:C:\. Microsoft's cipher documentation notes that it works across the entire volume, not only the folder you name.

Use cipher /w when you have deleted sensitive files but are not selling the drive yet. It is not a replacement for a full wipe before a sale, because it ignores anything still stored as a file.

Is wiping an SSD different from wiping a hard drive?

Yes. SSDs spread writes across spare flash cells through wear levelling, so overwriting from Windows may not reach every cell that once held data. The more reliable method is the drive maker's secure erase or sanitise command, which instructs the SSD firmware itself to clear all cells, including spare areas Windows cannot see.

Practical steps for an SSD or NVMe drive:

  1. Identify the brand and model under Settings > System > Storage > Advanced storage settings > Disks & volumes.
  2. Download the maker's own utility from its official site, for example Samsung Magician or Crucial Storage Executive.
  3. Look for an option called Secure Erase, Sanitize or similar. Some tools create a bootable USB for this because the drive cannot erase itself while Windows runs from it.
  4. If no tool exists for your drive, use Reset this PC with Clean data on top of BitLocker or device encryption (see below).

Cause and effect: TRIM, the command Windows sends to tell an SSD which blocks are no longer used, means deleted data on an SSD often becomes unreadable quickly. That helps, but it is housekeeping rather than a verified erase, so treat it as a bonus, not your wipe method.

Avoid third-party "free wiper" utilities from unknown sites. Many bundle adware, and your drive maker's tool knows the hardware better.

How does BitLocker help when wiping a drive?

If a drive has been encrypted with BitLocker or Windows device encryption, any leftover fragments on it are unreadable without the key. Resetting with Clean data then destroys the old encrypted volume. Microsoft describes BitLocker as rendering data inaccessible when protected devices are decommissioned or recycled, which makes it a strong extra layer for SSDs.

Check your status under Settings > Privacy & security > Device encryption on Home, or Control Panel > BitLocker Drive Encryption on Pro. Full BitLocker management, including encrypting secondary and USB drives, is available on Windows 11 Pro, Enterprise and Education, as the BitLocker overview confirms.

Advanced nuance: encryption only protects data written after it was switched on. Turning BitLocker on the day before a sale encrypts current files, but older deleted data in free space may sit outside that protection, so still finish with a clean-data reset.

If you are on Home and want BitLocker for future drives, our Windows 11 Pro vs Home comparison explains what else the upgrade adds.

Will wiping the drive remove my Windows licence?

Wiping removes the files but does not destroy the licence itself. A digital licence is tied to the PC's hardware and, where linked, your Microsoft account. If Windows came preinstalled, that licence usually stays with the computer, so a clean reset reactivates automatically for the buyer once online.

The situation differs by licence type:

  • Preinstalled (OEM) licence: normally belongs to that device and goes with it to the buyer.
  • Retail licence you bought separately: can usually be moved to your next PC once it is no longer used on the old one. Our guide to transferring a Windows licence walks through it.
  • Digital licence linked to your account: the activation troubleshooter can help reactivate it on new hardware after a change.

If you are selling the PC without Windows, or keeping your retail key for your new machine, the buyer will need their own licence. A genuine Windows 11 Home key covers most home buyers.

Frequently asked questions

Does Reset this PC with Clean data securely wipe a drive?

For a hard disk sold to a private buyer, Reset this PC with Clean data set to Yes is a practical, thorough wipe that overwrites your files so they are hard to recover. For SSDs, pair it with BitLocker or device encryption, or use the manufacturer's secure erase tool for stronger assurance.

How long does wiping a hard drive in Windows 11 take?

It depends on drive size and type. A clean-data reset or diskpart clean all on a large spinning hard disk can take several hours, because every sector is written. SSDs are generally much faster. Keep laptops on mains power and avoid interrupting the process, which can leave the drive unusable until restarted.

Can I wipe the C: drive while Windows is running?

No. You cannot format or run clean all on the disk Windows is currently using. Use Reset this PC with Clean data, which handles the system drive safely, or boot from a Windows 11 USB installer and delete the partitions from Setup before wiping. Secondary drives can be wiped from inside Windows.

Is drilling or smashing a hard drive necessary?

For a drive you intend to sell, physical destruction defeats the purpose. A full overwrite on an HDD, or a firmware secure erase on an SSD, is sufficient for typical personal data. Physical destruction is mainly used for failed drives that cannot be wiped, or where an organisation's policy requires it.

Do I need to remove the PC from my Microsoft account after wiping?

It is good practice. Signing in to account.microsoft.com/devices and removing the old PC keeps your device list tidy and stops the sold computer appearing in your Find my device list. It does not remove the hardware-linked licence, which stays with the PC for the next owner if it was preinstalled.

Related guides

Links in this guide

Link Type Why it helps
Windows 11 Pro Internal Edition with full BitLocker management
Windows 11 Home key Internal Licence for a buyer or a PC sold without Windows
Transfer a Windows licence Internal Move a retail licence to your next PC
Windows 11 Pro vs Home Internal Explains Pro-only security features
Recovery options in Windows External Microsoft's overview of Reset this PC
diskpart clean reference External Official explanation of clean vs clean all
cipher command reference External How cipher /w overwrites free space
BitLocker overview External Edition support and decommissioning benefits
Bitlocker, Data security, Guides, Reset this pc, Ssd, Windows 11