To wipe free space in Windows, you overwrite every unused part of a drive so that files you deleted earlier cannot be brought back with recovery software. Windows has a built-in command for this: open Command Prompt and run cipher /w:C:\, replacing C: with the drive you want to clean. Your existing files are not touched. On a traditional hard drive this works well; on an SSD it is less reliable, for reasons explained below. This guide covers both the built-in method and when you might want something else.
Why deleted files are still on your drive
When you delete a file and empty the Recycle Bin, Windows does not erase the file's contents. It simply marks the space as available. Until something new is written over that exact spot, the old data is still there, and free recovery tools can often find it, sometimes complete with its original name. Our guide on whether deleted files can be recovered explains this in more detail.
Wiping free space fixes the problem for files you have already deleted. It writes over all the space Windows considers empty, so the leftovers of old documents, photos and downloads are replaced with meaningless data. It is the right tool when:
- You deleted sensitive files the normal way and now wish you had shredded them.
- You want to clean up a drive you are keeping, without reformatting it.
- You are passing a PC to a family member but want to keep Windows and some files on it.
It is not the right tool for deleting files that still exist. For those, shred them directly, as described in how to permanently delete files in Windows.
How to wipe free space with cipher /w
The cipher command is part of Windows 10 and 11. Its /w switch overwrites deallocated (free) space on a volume in three passes: zeros, then 0xFF bytes, then random numbers.
- Close programs you do not need, and empty the Recycle Bin so recently deleted files are included.
- Click Start, type cmd, then choose Run as administrator. (Administrator rights are not always required, but avoid permission errors on system drives.)
- Type
cipher /w:C:\and press Enter. For another drive, use its letter, for examplecipher /w:D:\. - Wait. Cipher shows each pass as it runs. On a large, mostly empty hard drive this can take several hours.
Cipher gives no report at the end, and it does not tell you which old files have been overwritten. If you need a record, note the date and drive yourself.
Does wiping free space work on an SSD?
This is where people are often misled. On a hard drive, a given location on the disk always maps to the same physical spot, so overwriting free space really does overwrite the old data. SSDs work differently:
- Wear leveling spreads writes around the flash chips, so new data usually lands somewhere other than where the old file sat.
- Over-provisioning keeps spare flash that Windows cannot see or write to directly.
- TRIM tells the SSD which blocks are no longer in use, and the drive clears them in the background. On a modern SSD with TRIM enabled (the Windows default), deleted data often becomes unreadable fairly quickly on its own, but there is no guaranteed timing.
Overwriting free space on an SSD still helps, especially combined with TRIM, but no software can guarantee every old copy on an SSD has been overwritten. Running many overwrite passes on an SSD mostly adds wear without adding certainty. If you are retiring an SSD completely, use the manufacturer's secure erase or sanitize tool instead, as described in how to securely erase an SSD.
To check what kind of drive you have, open Start, search for Defragment and Optimize Drives, and look at the Media type column. It shows Hard disk drive or Solid state drive.
How long does wiping free space take?
Time depends on how much empty space there is, the drive's speed and how many passes run. A rough guide:
| Drive | Free space | Typical time for one pass |
|---|---|---|
| USB 2.0 flash drive | 32 GB | Around 30 minutes or more |
| Laptop hard drive | 500 GB | About 1.5 to 3 hours |
| Desktop hard drive | 1 TB | About 2 to 4 hours |
| SATA SSD | 500 GB | Usually under an hour |
Multiply by the number of passes. Cipher always does three, which is why it can feel slow on a big hard drive.
Tips for a thorough job
- Empty the Recycle Bin first. Files still in it are not free space.
- Clear temp files first. Use Settings > System > Storage > Temporary files (or Storage Sense) so leftovers are deleted and then covered by the wipe.
- Remember other drives. Wipe each drive separately, including USB sticks and SD cards.
- Think about cloud folders. Wiping a local drive does nothing to copies in OneDrive or other cloud storage. See permanently deleting files from OneDrive.
- Old restore points and shadow copies can also hold earlier versions of files, and a free-space wipe does not remove them.
Wiping free space with Evidence Wipe
Evidence Wipe includes a wipe free space option that overwrites the empty space on a drive so previously deleted files cannot be recovered, while leaving your existing files alone. It detects whether each drive is a hard drive, SSD, NVMe drive or USB drive and adjusts accordingly: SSDs get one verified pass plus TRIM, following NIST 800-88 guidance, while on hard drives you can choose DoD 5220.22-M (3 pass), DoD 5220.22-M ECE (7 pass) or Gutmann (35 pass). Every pass is read back and checked, and a Verification Report records what was done and when. It works on internal drives and on USB sticks, SD cards and external drives. The same honesty applies to SSDs here as with any tool: for a drive you are getting rid of, the manufacturer's secure-erase tool is the most complete option. Details are in the feature list.
Frequently asked questions
Does wiping free space delete my existing files?
No. Wiping free space only overwrites space Windows already considers empty. Your current files and programs are not touched.
How long does cipher /w take?
It depends on the drive's size, speed and how much space is free. On a large hard drive with lots of free space it can take several hours, because cipher always runs three passes.
Should I wipe free space on an SSD?
It can help, but on an SSD TRIM already clears most deleted data, and no software can guarantee every old copy is overwritten. For an SSD you are getting rid of, use the manufacturer's secure erase tool instead.
