/w switch overwrites unused space on a local NTFS volume, reducing the chance that files you previously deleted can be recovered with ordinary recovery tools. On both Windows 11 and Windows 10, run cipher /w:C:\ to wipe free space on drive C:. It does not erase files that still exist, reinstall Windows, wipe other drives, or reliably sanitize an SSD for high-assurance disposal. For a PC you are selling or donating, Windows’ Reset this PC option with Remove everything and Clean data is the better consumer-facing method; for sensitive business, legal, or regulated data, use an approved drive-sanitization process or retain and destroy the storage device.Windows 10 reached end of support on October 14, 2025, but the Cipher command remains documented for Windows 10 and Windows 11. The procedure below is most appropriate for a working PC with a traditional hard disk drive (HDD) after you have deleted private files and want to overwrite the remaining free space without reinstalling Windows.
Understand what cipher /w wipes
When Windows deletes a file, it normally marks its occupied disk space as available for reuse. The file may no longer appear in File Explorer, but portions of its old data can remain on the drive until new data overwrites those sectors.
cipher /w:<directory> targets the entire volume containing the directory you specify. The directory is only used to identify the volume; Cipher does not limit its work to that folder.
For example:
cipher /w:C:\
wipes available unused space on the C: volume.
cipher /w:D:\
wipes available unused space on the D: volume.
This is important: running the following command does not limit wiping to the Documents folder:
cipher /w:C:\Users\YourName\Documents
It still wipes free space throughout C: because that folder is on C:.
Cipher’s free-space wipe does not:
Quick walkthrough
- Delete documents, photos, applications, or Windows files that are still allocated to the file system.
- Empty the Recycle Bin for you.
- Remove files stored on another internal drive, an external drive, a USB flash drive, a network location, or a cloud service.
- Erase existing backups, File History copies, OneDrive files, email attachments, recovery partitions, or another user’s currently stored files.
- Reinstall Windows or remove your Windows account.
- Provide proof that every possible residual copy of a file has been removed.
- Securely sanitize flash-based storage to the same standard as a purpose-built SSD sanitize or cryptographic-erase process.
Check the drive type before proceeding
Warning: Do not treat Cipher as a secure-disposal tool for SSDs. SSDs use wear leveling, overprovisioned storage, and controller-managed blocks. A Windows command that writes to the visible free space cannot reliably address every physical location that may have contained prior data. NIST has specifically cautioned that ordinary overwrite techniques can be unreliable on flash storage because wear leveling may redirect writes elsewhere.
If the PC has an SSD and you are preparing it for sale, donation, return, or recycling:
- Back up anything you intend to keep.
- Use Reset this PC with Remove everything and enable Clean data when prompted.
- If the data is highly sensitive, follow your organization’s media-sanitization policy, use the drive manufacturer’s supported sanitization capability, or remove and retain the SSD rather than transferring it with the PC.
Microsoft describes the Reset option’s data-cleaning feature as a consumer safeguard that makes recovery harder; it is not a government or industry data-erasure standard.
For an HDD that you intend to keep using, cipher /w remains a practical built-in way to overwrite free space after deleting private data.
Prepare the volume for a free-space wipe
Cipher overwrites currently unallocated space. Remove the items you actually want gone before starting it.
- Confirm the correct drive letter.
- Open File Explorer.
- Select This PC.
- Note the letter beside the volume you intend to clean, such as Local Disk (C🙂 or Data (D🙂.
- Move or back up files you want to keep.
- Cipher does not intentionally erase allocated files, but free-space wiping is a lengthy disk-intensive operation. Do not begin until essential files are safely backed up.
- Delete the private files you no longer need.
- In File Explorer, select the files or folders.
- Press Delete, then confirm deletion if Windows asks.
- For immediate deletion without placing the items in the Recycle Bin, select them and press Shift+Delete. This is permanent from Windows’ perspective, so verify the selection first.
- Empty the Recycle Bin.
- Open Recycle Bin from the desktop.
- Select Empty Recycle Bin.
- Confirm the deletion.
- Close programs and pause unnecessary activity.
- Save work and close applications, especially programs that create or download files.
- Pause large syncs, downloads, virtual machines, backups, and disk-heavy tasks if practical.
- Leave the PC connected to reliable power. For a laptop, connect the charger.
- Make sure the target volume has enough free space to be worthwhile.
- In This PC, right-click the target drive and select Properties.
- Review the Free space value.
- More free space means more space for Cipher to overwrite, but also a longer process.
A free-space wipe can take a long time. Its duration depends primarily on the amount of free space, the speed and condition of the drive, and other activity on the computer. Plan for the PC to be unavailable for normal work while it runs.
Wipe free space with Cipher
No restart is required before or after the command. Use Command Prompt so the command is entered exactly as shown.
Wipe the Windows drive, C:
- Select Start and type:
cmd - Select Command Prompt from the search results.
- At the prompt, type the following command and press Enter:
cipher /w:C:\ - Leave the Command Prompt window open until the process completes and the prompt returns.
Cipher uses the directory after /w: to determine which volume to clean. The backslash in C:\ makes the intended target clear: the root folder of the C: drive.
Wipe a separate data drive
To wipe unused space on a different local volume, substitute its correct drive letter. For example, for D::
cipher /w:D:\
Do not run a command for a drive unless you have confirmed the letter in File Explorer.
Warning: A mounted folder can point to another volume. Microsoft notes that if the directory you specify is a mount point or points to a folder on another volume, Cipher cleans free space on that other volume. For routine use, specify the root of the intended drive—such as C:\ or D:\—rather than a mounted folder path.
What to expect while Cipher runs
Cipher overwrites unallocated space across the selected volume, not merely the remnants of one deleted file. It may run for much longer than expected even if you deleted only a few files, because it works according to the amount of free space on the volume.
While it runs:
- Keep the Command Prompt window open.
- Avoid storing new files on the target volume if possible.
- Do not put the PC to sleep or shut it down.
- Avoid running disk cleanup, defragmentation, backup, cloning, or another drive-intensive job at the same time.
- Expect reduced responsiveness, particularly on a slower HDD.
If the computer is a laptop, use AC power and adjust its power settings temporarily if needed so it will not sleep before the task finishes.
Verify that the free-space wipe completed
There is no safe recovery test built into Cipher, and a successful completion cannot prove that every possible historical copy is gone. Instead, verify the command completed normally and that you targeted the correct volume.
- Return to the Command Prompt window.
- Confirm that Cipher has finished and the regular command prompt is available again.
- In File Explorer, open This PC and confirm that the intended drive is still available.
- Check that your files and applications are still present. Cipher should affect unused space only, not files that remain allocated.
- If you had private files in the Recycle Bin before starting, open Recycle Bin and confirm it is empty.
A change in the drive’s available free-space number is not, by itself, proof of secure deletion. Cipher temporarily consumes free space while it performs the overwrite work, then releases it when finished.
Use Reset this PC instead when transferring the computer
If someone else will receive the entire PC, wiping free space alone is incomplete. It leaves Windows installed, preserves currently allocated user and system data, and does not remove accounts or applications.
Use Reset this PC after you back up your files and, if device encryption or BitLocker is enabled, make sure you have the recovery key.
Windows 11
- Open Start > Settings.
- Select System > Recovery.
- Under Recovery options, select Reset PC.
- Select Remove everything.
- Choose Cloud download or Local reinstall.
- When the reset options are shown, enable Clean data if you are selling, donating, recycling, or giving away the PC.
- Follow the on-screen prompts and allow the reset to complete without manually restarting the PC.
Windows 10
- Open Start > Settings.
- Select Update & Security > Recovery.
- Under Reset this PC, select Get started.
- Select Remove everything.
- Choose Cloud download or Local reinstall if prompted.
- Enable Clean data when Windows offers that setting for the reset.
- Follow the prompts and allow Windows to complete the process.
Resetting is destructive. Once you choose Remove everything, do not expect an easy rollback. Confirm that backups are readable before beginning.
Troubleshoot Cipher free-space wiping
“The system cannot find the path specified”
Check the command format. The /w switch needs a colon and a valid directory path on the target volume.
Use:
cipher /w:C:\
Not:
cipher /w C:\
and not:
cipher /w:
If cleaning another drive, replace only the drive letter:
cipher /w:E:\
Cipher is taking hours
That is normal when the target volume has substantial free space. Cipher is not measuring only the size of the files you deleted. It is overwriting available unused space across the volume.
Close other programs, keep the PC powered on, and allow it to finish. Do not assume it is stuck solely because the task is slow.
The PC becomes sluggish
Free-space overwriting creates sustained disk activity. Close unnecessary applications and wait for Cipher to finish. If the computer is becoming unresponsive, allow several minutes for disk activity to settle before deciding whether intervention is necessary.
If you interrupt a wipe, do not assume the drive’s free space has been fully processed. Run the command again later if you need to complete the task.
You used Cipher but are still concerned about an SSD
Do not rely on a second Cipher pass as the answer. The limitation is not simply the number of passes; it is that SSD controllers may remap writes and retain inaccessible physical areas. For a transfer or disposal scenario, reset the PC with Clean data enabled, then use an approved device- or manufacturer-specific sanitization method if the risk level requires it.