Last Updated on August 17, 2026
Computer security is an ever growing priority these days with all the cybersecurity threats out there. Whether it is a virus attack, phishing attempts, email scams or even someone stealing your computer, it is hard to stay safe. You need to protect your private data.
If you are a Microsoft Windows user then you probably know that when you delete a file or folder, it goes to the Windows Recycle Bin. This happens unless you do something like hold down the Shift key while deleting it or if it is too large for the Recycle Bin. These files and folders in the Recycle Bin are not really deleted and are still recoverable until you empty the bin.
Even if you empty the Recycle Bin, it is still entirely possible to get these files back. People can use basic free software such as Recuva to pull your data from the drive. If you want to permanently wipe these deleted files from your hard drive, you can use a wide variety of third party applications to do so.
You might not want to use any additional software on your machine. You still have a native built in option. In this article, we will be showing you exactly how to wipe the free space in Windows without using third party software.
Understanding the Cipher Command
1. Launch Microsoft PowerShell
The process we are going to be using to wipe the free disk space in Windows will be done via Microsoft PowerShell. PowerShell is a task automation and configuration management framework from Microsoft. It consists of a robust command line shell and scripting language. It allows users to run commands called cmdlets to manage computers and local files.
2. Learn How Cipher Works
There is a specific command for PowerShell called cipher that can be used to wipe the free disk space on your Windows drive. It also works on any other hard drive installed within your computer. The cipher command overwrites all free space on the specified drive or volume with random data. This helps prevent the recovery of previously deleted files using basic recovery tools.
3. Understand the Three Wiping Passes
This native tool does not delete your active files. It strictly cleans up unused disk space where deleted files once resided. It does this by performing three distinct passes over the storage media. It writes 0s, then 255s, and finally random data over the entire free space.
4. Know the Difference Between HDDs and SSDs
How well this process works will depend heavily on the type of hard drive you are trying to wipe. If you are using a mechanical spinning disk such as a SATA drive, it will work perfectly. The cipher command is much less effective on modern solid state drives.
5. Understand SSD Limitations
SSDs manage data using wear leveling, TRIM, and overprovisioning functions. These features help extend SSD lifespan and performance but prevent data from being reliably overwritten in the exact same physical locations. Deleted data may still exist in parts of the drive that cipher cannot access or erase. This makes the tool better suited for traditional hard drives than an SSD or NVMe hard drive.
Executing the Disk Wipe Process
1. Open an Administrative Prompt
To use cipher to wipe the free disk space in Windows, you will need to open an administrative PowerShell prompt. Type PowerShell directly into the taskbar search box. Right click the app icon and choose the Run as administrator option.
2. Back Up Your Data First
You should always run your regular backup before doing anything like this on your computer. Wiping free space is generally safe but power outages during disk operations can cause corruption. Secure your important files on an external drive just in case.
3. Run the Cipher Command
The specific command we will be using is cipher /w:E where E is the exact drive letter you wish to wipe. You can easily do this on your main Windows C drive by typing cipher /w:C instead. Press Enter to execute the command and start the wiping process.
4. Close Your Open Applications
Once the cipher command starts to run, you will be informed that you should close any open applications for the absolute best result. The system needs exclusive access to the free space to overwrite it properly. You will then see a dotted line going across the screen. It will do this for several minutes while wiping the free disk space.

5. Wait for the Final Passes
You will most likely see other status messages on the screen during the lengthy process. It will display text such as Writing Random Numbers while it completes the final security pass. When the disk wiping process is completely finished, you will be brought back to the standard PowerShell prompt. You can then close the PowerShell window or even run the process again to wipe the drive one more time.
For additional training resources, check out our online IT training courses.
Check out our extensive IT book series.






