Windows has built-in tools that will allow you to write zeros to a drive, safely erasing its contents. This ensures that files deleted on the drive cannot be recovered. Whether you want to clean an internal drive or an external USB drive, here’s how to do it.
It is often possible recover deleted files from a drive . Whether this is possible depends on several factors.
If the unit is a traditional magnetic unit with a turntable, deleted files are simply “marked” as deleted and they will be overwritten in the future, making it easy to recover deleted data. This should not be the case in modern solid state drives, as they should use TRIM by default, ensuring that deleted files are removed immediately. (This helps with speed).
However, it is not as simple as the storage mechanic front to solid state storage – External storage devices like USB flash drives are not TRIM compliant, which means that deleted files can be recovered from USB flash drive.
To prevent this from happening, you can “clean” a drive. This is actually quite a simple process: Windows will write zeros or other junk data to each sector of the drive, forcibly overwriting any data already there with junk data. This is a particularly important step to take when you are selling or disposing of a computer, drive, or USB device that contained sensitive private data.
By the way, if a drive is encrypted, this provides a lot of extra protection. Assuming an attacker cannot obtain your encryption key, they will not be able to recover deleted files from a drive; you won’t even be able to access files that haven’t been deleted yet.
To write zeros over the contents of any drive, all you have to do is perform a full format of the drive. Before doing this, keep in mind that this will completely erase all files on the drive. Also, you cannot do a full format of the Windows system drive while running Windows from it.
This method is ideal for internal drives that do not have their operating system installed, USB flash drives, other external storage devices, and any partition complete you want to delete.
To get started, open File Explorer and find the drive you want to clean. Right click and select “Format”.
Uncheck “Quick Format” under Format Options. This will ensure that Windows 10 or Windows 11 will do a full format for you. According Microsoft documentation From Windows Vista, Windows always writes zeros to the entire disk when it performs a full format.
You can change any other format option that want here; just make sure “Quick Format” is not checked. (If you’re not sure what to choose, leave the options here at 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 your important files before proceeding.
If you have deleted some files from a mechanical hard drive or external storage device, you may want to erase only the free space, overwriting it with zeros. This will ensure that those deleted files cannot be easily recovered without cleaning the entire disk.
Windows 10 and Windows 11 have a way to do this, but you will have to visit the command line. The
cyphercommand built into Windows has an option that will erase the free space of a drive and it will overwrite it with data. The command will actually execute three passes, first writing with zeros, then another type of data, then random data. (Nevertheless, a single pass should be sufficient ).
To get started, start a command line environment such as command prompt or Windows terminal with administrator permissions. In Windows 10 or Windows 11, you can right-click the Start button or press Windows + X and click on “Windows PowerShell (Admin)”, “Command Prompt (Admin)”, “Windows Terminal (Admin)”. Choose what appears on the menu; either will work.
Run the following command, replacing X with the letter of the drive for which you want to clean up free space:
cifrado / w: X:
For example, if you wanted to clean up the free space on your D: drive, you would run the following:
cifrado / w: D:
The command will display its progress on the command line. Wait for it to finish; Depending on the speed of your drive and the amount of free space you want to overwrite, it may take some time.
If you want to erase the entire drive from your Windows operating system, there is an easy way to do it. This option is built into the Reset this PC feature in Windows 10 and Windows 11, although it is not enabled by default.
While Windows is restoring to factory default settings, in other words reinstalling Windows, you can make it erase the system drive. You should use this option to protect your private data when you sell your PC or give it to someone else.
To do this in Windows 10, head to Settings> Update & Security> Recovery. Click “Get Started” under Reset this PC. (You can press Windows + i to quickly open the Settings app.)
In Windows 11, head to Settings> System> Recovery. Click the “Reset PC” button under Recovery Options.
Select “Delete All” to have Windows delete all your files during the reboot process.
Select “Local Reinstall” or “Cloud Download”, either will work for this process. If you are not sure which one to choose, we recommend that you select “Local Reinstall” to avoid the big download.
The ” Cloud download »Is useful if your local Windows operating system files are corrupted and the Reset this PC process will not work otherwise. Also, believe it or not, cloud download can be faster than local reinstallation, as Windows only has to download the installation files rather than reassembling them from the files on your computer’s hard drive. ; it depends on the speed of your internet connection.
Under Additional settings, select “Change settings”.
Clear the switch under “Clear data?” to set it to “Yes”. With this option enabled, Windows will “wipe the drive” and make it much more difficult (theoretically, practically impossible) to recover your files.
Windows warns you that this process can take hours; as always, it depends on the speed and size of the drive on your computer.
Now you can click “Confirm” and proceed with the process to reset your Windows 10 or Windows 11 PC and clean your drive during this process.
Warning: This process will erase all the files, applications, and settings on your disk, leaving you with a fresh installation of Windows without any of your files. Make sure to back up everything important first.
By the way, Windows refers to this process as “cleaning the drive” rather than cleaning it. This is different from traditional meaning of “wiping” a drive in Windows , which actually refers to deleting all the information from your partition instead of erasing it.