To delete a drive on Windows 10 or Windows 11

An illustration of a mechanical hard drive that goes into resolution.
Daniel Krason /

Windows has built-in tools that allow you to write zeros to a drive and delete its contents securely. This ensures that deleted files on the drive cannot be recovered. Whether you want to delete an internal drive or an external USB drive, follow these steps.

What you need to know

It is often possible to recover deleted files from a drive. Whether this is possible depends on a number of factors.

If the drive is a traditional magnetic drive with a rotating disk, deleted files are simply “marked” as deleted and will be overwritten in the future, making recovery of deleted data easy. This should not be the case on modern solid-state drives, as they need to use TRIM by default, ensuring that deleted files are deleted immediately. (This helps with speed.)

However, it is not as simple as mechanical vs. mechanical. solid-state storage: External storage devices such as USB flash drives do not support TRIM, which means deleted files could be recovered from a USB flash drive.

To prevent this from happening, you can “wipe” a drive. This is actually a fairly simple process: Windows will write zeros or other unwanted data to each sector of the drive, forcibly overwriting any data already there with unwanted data. This is a particularly important step to take when selling or otherwise disposing of a computer, drive or USB stick that had sensitive private data on it.

By the way, if a drive is encrypted, this provides a lot of extra protection. Assuming an attacker could not get your encryption key, they would not be able to recover deleted files from a drive – they would not even be able to access files that have not yet been deleted.

Option 1: Wipe any entire drive

To write zeros over the contents of any drive, simply execute a full format of the drive. Before doing this, keep in mind that this will delete all files on the drive completely. You can also not run a full format of your Windows system drive while running Windows from it.

This method is ideal for internal drives that do not have your operating system installed, USB flash drives, other external storage devices, and any partitions you want to delete.

To get started, open File Explorer and locate the drive you want to delete. Right-click on it and select “Format”.

Right-click on a disk and select "Format."

Deselect “Quick Formatting” under Format Options. This ensures that Windows 10 or Windows 11 executes a full format instead. According to Microsoft documentation, ever since Windows Vista, Windows always writes zeros to the entire disk when performing a full format.

You can change any other formatting options you like here; Just make sure “Quick Format” is not selected. (If you are not sure what to choose, just leave the settings here in their default settings.)

When you are ready, click “Start” to format the drive. The process may take some time depending on the size and speed of the disk.

Warning: The formatting process will erase everything on the drive. Make sure you have a backup of important files before proceeding.

Deselect "Quick formatting" and click "Start."

Option 2: Delete free space only

If you have deleted some files from a mechanical hard drive or external storage device, you may only want to delete the free space and overwrite it with zeros. This ensures that the deleted files cannot be easily recovered without wiping the entire drive.

Windows 10 and Windows 11 have a way of doing this, but you will need to visit the command line. That cypher the command built into Windows has an option that deletes a drive’s free space and overwrites it with data. The command will actually run three times, first typing with zeros, then another type of data, then random data. (But just one review should be enough.)

To get started, start a command-line environment such as the command prompt or Windows Terminal with administrator privileges. On either Windows 10 or Windows 11, you can right-click the Start button or press Windows + X and click either “Windows PowerShell (Admin)”, “Command Prompt (Admin)”, “Windows Terminal (Admin)”. Choose what to display in the menu – any will work.

Right-click on Start and select "Windows PowerShell (Admin).")

Run the following command and replace the X with the drive letter of the drive for which you want to delete free space:

cipher /w:X:

For example, to delete free space on your D: drive, run the following:

cipher /w:D:

The command shows its progress on the command line. Wait until it’s done – depending on the speed of your drive and the amount of free space to overwrite, it may take some time.

Run the cipher / w command.

Option 3: Delete your Windows system drive

If you want to delete your entire Windows operating system drive, there’s an easy way to do that. This option is built into the Reset this PC feature on Windows 10 and Windows 11, even if it is not enabled by default.

While Windows restores itself to factory settings – in other words, reinstalling Windows – you can have it erase your system drive. You should use this option to protect your private data when selling your PC or giving it to someone else.

To do this on Windows 10, go to Settings> Update and Security> Restore. Click “Get Started” under Reset this PC. (You can press Windows + i to quickly open the Settings app.)

click "Get started."

On Windows 11, go to Settings> System> Restore. Click the “Reset PC” button under Recovery Options.

click "Reset PC."

Select “Remove All” to have Windows remove all your files during the reset process.

click "Remove everything."

Select “Local reinstall” or “Cloud Download”, either will work for this process. If you are not sure which one to choose, we recommend selecting “Local Reinstall” to avoid the big download.

“Cloud Download” is useful if your local Windows operating system files are corrupted and otherwise reset this PC process will not work. Believe it or not, Cloud download can be faster than local reinstallation, as Windows just needs to download installation files instead of re-assembling them from the files on your computer’s hard drive – it depends on the speed of your internet connection.

choose "Cloud download" or "Local reinstall."

Select “Change settings” under Additional settings.

Click or press "Change settings."

Clean the contact under “Clean data?” to set it to “Yes”. With this option enabled, Windows will “clean the drive” and make it much harder (theoretically, virtually impossible) to recover your files

Windows warns you that this process can take hours – as it always depends on the speed and size of the drive in your computer.

You can now click “Confirm” and continue through the process to reset your Windows 10 or Windows 11 PC and wipe your drive during this process.

Warning: This process will delete all files, applications and settings on your drive, leaving you with a fresh Windows installation without any of your files. Be sure to back up everything important first.

Activate "Clear data?".

By the way, Windows refers to this process as “cleaning the drive” instead of wiping it. This is different from the traditional meaning of “cleaning” a drive in Windows, which actually refers to removing all its partition information instead of deleting it.

Leave a Comment