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.

WindowsFilessystemsecurityMedium risk
Run `cipher /w:C:\` in an elevated prompt to overwrite all free space on drive C: in three passes (zeros, 0xFF, random) so deleted files become unrecoverable.

01Command

Command
$ 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

RiskMedium risk
RequirementsNo other heavy disk activity during the run; only affects free space, existing files are untouched.
!Warning: This is not a substitute for a full drive wipe: data inside files, page files and system restore points is untouched — encrypt the disk with BitLocker before reuse for stronger protection.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • cipher | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: 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 CMD
    SS64 · technical · 2026-09-17
    Evidence: 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