**Disclosure: This post contains affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you.
Computer security is an ever growing priority these days with all the cybersecurity threats out there. Whether it’s a virus or spyware attacks, phishing attempts, email scams or even someone stealing your computer, it’s hard to stay safe these days.
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 unless you do something like hold down the Shift key while deleting it or if it’s too large for the Recycle Bin. And these files and folders in the Recycle Bin are not really deleted and are still recoverable until you empty the Recycle Bin. But even if you empty the Recycle Bin, it’s still possible to get these files back even using basic free software such as Recuva for example.
So, 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. But if you do not want to use any additional software, then you still have an option. In this article, we will be showing you how to wipe the free space in Windows without using third party software.
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, consisting of a command-line shell and scripting language. It’s designed for system administrators and power users to control and automate the administration of Windows and other systems. It allows users to run commands, called cmdlets, and write scripts to manage computers, files, processes, and more.
There is a command for PowerShell called cipher that can be used to wipe the free disk space on your Windows drive or other hard drive installed within your computer. How well this process works will depend on the type of hard drive you are trying to wipe. If you are using a spinning disk (HDD) such as a SATA drive, then it will work better than if you were using an SSD or NVMe hard drive.
The cipher command overwrites all free space on the specified drive or volume with random data, which helps prevent the recovery of previously deleted files using basic recovery tools. It does not delete files; instead, it cleans up unused disk space where deleted files once resided. It does this by performing three passes: writing 0s, 255s, and random data over the free space.
The cipher command is less effective on SSDs because of how they manage data using wear-leveling, TRIM, and overprovisioning. These features help extend SSD lifespan and performance but prevent data from being reliably overwritten in the same physical locations. As a result, deleted data may still exist in parts of the drive that cipher can’t access or erase, making it better suited for traditional hard drives than SSDs.
To use cipher to wipe the free disk space in Windows, you will need to open an administrative PowerShell prompt by typing PowerShell in the taskbar search box and then choosing the Run as administrator option. The command we will be using is cipher /w:E where E is the drive letter you wish to wipe. You can do this on your Windows C drive and it’s always a good idea to run your regular backup before doing anything like this on your computer.
Once the cipher command starts to run, you will be informed that you should close any open applications for the best result. You will then see a dotted line going across the screen and it will do this for several minutes while wiping the free disk space.
You will most likely see other messages on the screen during the process such as Writing Random Numbers and so on. When the disk wiping process is complete, you will be brought back to the PowerShell prompt, and 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.