Skip to content

Wipe the free space on a drive so deleted files can't be recovered — via Microsoft Learn

Commandmedium riskNeeds adminWindows 11Windows 10

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

  1. Close other programs and run the command in an elevated Command Prompt. Change C:\ to the drive you want to wipe.
  2. 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

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.

cipherwipefree spacesecure deleteprivacy

More in Hidden Tools & Commands

Download a full macOS installer from Terminal — via SS64

Commandlow risk

softwareupdate can list and download complete macOS installers, including older versions Apple still serves. Useful for making a bootable USB installer or installing on another Mac without hunting through the App Store. This entry only downloads; it doesn't install anything.