Securely wipe free disk space with cipher /w
Windows' built-in tool for overwriting freed disk clusters so previously deleted files can't be recovered — no third-party shredder needed.
01Command
$ cipher /w:C:\02What it does
When a file is deleted only its directory entry goes away; the data blocks remain recoverable until overwritten. cipher /w walks every free cluster and writes a pass of 0x00, then 0xFF, then random data, leaving no recoverable residue of anything you deleted. Existing files are never touched — the operation only claims unallocated space, so you can keep using the PC, though performance will suffer and the run can take hours on a multi-TB drive. It only works on NTFS volumes and only on the free space of the letter you give; for whole-drive sanitization use the manufacturer's secure erase or BitLocker encryption followed by a quick format.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- cipher | Microsoft LearnEvidence: Microsoft documents cipher /w as wiping data from unused portions of the volume by writing zeroes, 0xFF values, and random numbers three times over.
- Cipher - Encrypt and wipe - Windows CMDEvidence: SS64 explains that cipher /w overwrites free disk space in three passes without touching existing files.
Last verified: 2026-09-17 · Category: Security & Privacy
06Related solutions
Two-step command sequence that makes you the owner of a locked file tree and grants yourself full control — the standard fix for 'Access is denied' on old profiles and OS reinstall leftovers.
Diagnose NTFS file system errors and bad sectors on any volume — including the system drive while Windows is running — before committing to a repair.
Robocopy is Windows' built-in robust file copier: use /MIR to keep a destination folder as an exact one-way mirror of a source, resumable and restartable.