How to wipe unallocated disk space in Windows
Such a tool exists in the form of a native, little-known Windows utility called cipher
.
cipher.exe has been included in Windows systems since Windows 2000, with the original purpose of encrypting and decrypting files and folders using EFS encryption.
However, all that's needed to securely wipe the free space on a hard drive is cipher's /w
switch:
cipher /w:C:
Note that cipher
's syntax is slightly odd in that it requires one colon after the /w
switch, followed by the drive letter of the volume that you want to securely wipe. If your system contains both a boot drive and a data drive, you'll want to wipe both separately with cipher /w
for maximum security, or wipe just the data drive to cover yourself for most purposes.
cipher
works by creating a folder called EFSTMPWP
on the root of the target drive; inside this folder, it successively fills three temporary files with zeroes, ones and random data, one after the other, each one filling the size of the empty space left on the drive. By the time a file has taken up all of the drive's empty space, it's effectively forced the filesystem to overwrite all data held in its free space with the file's newly-written data, rendering any data previously held there permanently irrecoverable.