How to Wipe a Hard Drive in Windows 10

To wipe a hard drive in Windows 10, right-click the drive in File Explorer, select Format, clear Quick Format, and select Start. To erase every sector of a whole disk, use the clean all command in diskpart. To wipe the drive Windows is installed on, reset the PC and choose Remove everything instead.

Applies to: Windows 10. Windows 10 reached end of support on October 14, 2025, and only PCs enrolled in Extended Security Updates still get security fixes, through October 12, 2027.

Wiping can’t be undone. Back up anything you want to keep, and double-check the drive letter and disk number before you start.

Why deleting files isn’t enough

Deleting files or doing a quick format only removes the list of where files are. The data stays on the drive until something overwrites it, and free recovery tools can often bring it back. A wipe overwrites the data so it can’t be recovered. Do this before you sell, donate, recycle or return a drive.

Wipe a drive with a full format

Use this for a second internal drive, an external drive, or a USB flash drive.

  1. Open File Explorer and select This PC.
  2. Right-click the drive and select Format.
  3. Choose a File system (NTFS for internal drives, exFAT for drives you share with other devices) and type a Volume label.
  4. Clear the Quick Format check box.
  5. Select Start, then OK to confirm.
Windows 10 Format window for drive E with Quick Format cleared and the Start button highlighted
Clear Quick Format (1), then select Start (2).

A full format goes over the whole drive and takes much longer, sometimes hours on a large drive.

Wipe a whole disk with diskpart

This erases every partition on the disk and sets every sector to zero.

  1. Right-click Start and select Command Prompt (Admin) or Windows PowerShell (Admin). Select Yes.
  2. Type diskpart and press Enter.
  3. Type list disk and press Enter. Find your drive by its size.
  4. Type select disk 1 and press Enter. Use your drive’s number. Picking the wrong number erases the wrong drive.
  5. Type clean all and press Enter.
Windows 10 Command Prompt running diskpart with select disk 1 and clean all highlighted
Select the disk (1), then run clean all (2).

When it finishes, type exit. The disk is now empty and has no partitions. To use it again, create a new volume in Disk Management, then format the drive in Windows 10.

Wipe only the free space

If you want to keep your files but erase old deleted ones, open Command Prompt and type cipher /w:E:\, using your drive letter. Windows overwrites the free space on that drive. It can take a long time.

Wipe the drive Windows is on

You can’t format or clean the drive Windows is running from. Instead, go to Settings > Update & Security > Recovery, select Get started under Reset this PC, and choose Remove everything. Turn on the option to clean the drive. The full process, with screenshots of each choice, is in wiping a Windows 10 computer before selling it.

If the wipe won’t start or finish

  • “Windows was unable to complete the format”: the drive may be write-protected or failing. Try formatting it in Disk Management instead.
  • The disk is read-only: in diskpart, after select disk, type attributes disk clear readonly, then try again.
  • The disk shows as Offline: in diskpart, type online disk after selecting it.
  • clean all looks stuck: it shows little or no progress while it works. Leave it running, even for hours on a big drive.
  • Access denied: the window isn’t running as administrator. Close it and open an admin window.

If the drive is dead

A drive that no longer works can’t be wiped by software, but it may still hold readable data. Remove it from the PC and have it destroyed by an electronics recycler that offers certified data destruction, or physically damage the platters or memory chips before you dispose of it.

Frequently asked questions

Does this work on SSDs and flash drives?

Yes, these steps erase what Windows can see. SSDs and flash drives manage their own storage, so some old data may remain in spare areas. For an SSD, check the drive maker’s tool for a secure erase option.

How long does a full wipe take?

It depends on the drive’s size and speed. A large hard drive can take several hours. Leave the PC plugged in until it finishes.

Can wiped files be recovered?

Not with normal recovery tools after a full format or clean all. After a quick format, they often can.

Is there an extra step for SSDs?

Yes. If your Windows edition has BitLocker, turn it on for the drive before you wipe it. Any data left in the SSD’s spare areas is then encrypted and unreadable. Here is how locking a drive with BitLocker in Windows 10 works.

Should I wipe a drive before I recycle or sell it?

Yes. A full format or clean all is enough for most people. If the drive held very sensitive data, physically destroying it is the safest option.

For every command option, check Microsoft’s references for clean, cipher, and Recovery options in Windows.

On a newer PC, follow wiping a hard drive in Windows 11.