Windows Command Line Tool to Delete Free Space on Hard Drive

For those who does not know why we need to delete free space on hard drive, whenever we delete a file, even if we empty the trash can. The file is not actually deleted, it’s only marked as deleted. With proper tool, you can still recover the file. If you are worried about someone might recover your deleted files, you need to delete the free space on your hard drive, so that the files cannot be recovered again.

There are a lot of 3rd party software which does this. However, Windows already has a built in command line tool for this. This tool is available since Windows 8. To use it, it’s quite simple. First, open up an elevated command prompt. Then type in the following command:

cipher /w:e:\

In this example, e:\ is the drive which we want to delete the free space. Substitute it with the drive letter on your system. Note that depending on the size of your hard drive, it might take a while to finish. cipher is a very useful command line tool. It can be used to encrypt directories on NTFS file system. For usage, you can type

cipher /?

to see the details.


This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.