Wipe the free space on a drive so deleted files can't be recovered — via Microsoft Learn
When you delete a file, its data stays on the disk until it's overwritten. cipher /w overwrites all of a drive's free space, so previously deleted files can't be recovered with undelete tools. Your existing files aren't touched.
Takes effect right away
The easy way
- Close other programs and run the command in an elevated Command Prompt. Change
C:\to the drive you want to wipe. - It can take a long time on large drives. Let it finish.
Command
Run in an administrator Command Prompt / Terminal window.
cipher /w:C:\This is permanent by design: there's no undo, and the deleted data it overwrites is gone for good. It also writes a lot of data, which takes time and adds wear on SSDs.
Sources
- cipher — by Microsoft Learn
- Use Cipher.exe to overwrite deleted data — by Microsoft Learn
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me
Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.