How to Securely Erase a Drive or a Deleted File?

Deleting files doesn’t mean that it is completely removed from the computer. It actually stays right where it is, but its file name is removed from the location, but remains in the hard drive. The file still exists, but the computer is informed that the space that the deleted file used to occupy is no longer needed. When a computer needs the free space that was earlier occupied by the deleted file, then the new file has been overwritten on that space. If this does not take place, then the file in question may still be recovered at any time. So, just deleting files from your computer or a USB flash drive isn’t enough. There are times when you want to really erase them. Here is the tutorial to wipe everything off a drive.

erase drive

You can erase a drive securely from the windows without the use of any extra software.  Windows have an in-built feature for securely erasing drives. It is simply a command line tool called Cipher.exe. This tool is mainly useful in managing the Encrypted File System (EFS). It also has a switch that provides for the over-writing of all free space on a drive with a random sequence of 1′s and 0′s.

The command syntax for erasing the deleted files from a drive is misunderstood. One peculiarity of this command is that the Microsoft instructions seem to specify that you have to designate a folder and then all the free space on the drive that contains the folder will be over-written. The reason for including a folder in the syntax seems to be so that folders mounted as volumes are included. Here is the procedure to securely erase deleted files from a volume or drive (D:\, E:\, etc.)

Follow the usual procedure to delete everything that is to be wiped off the drive D:\ , E:\, etc. As stated earlier that the files are not actually deleted still there in the free space. So, the next step is to write over the free space with the Cipher command. To achieve that follow the steps described below.

  • Open a command prompt with Administrator privilege
  • Enter the command cipher /w:X:\Somefolder ,where X is the Drive from where you want to erase the deleted file and Somefolder can be any folder that hasn’t been deleted. Unless the folder has been mounted as a drive, it isn’t affected. The command Cipher will then write random bits all over the free space. It does three passes. It does not affect files that have not been deleted.

cipher command

It seems to be a slower process and can take hours if it is large drive. So, better try erasing the drive overnight. The Cipher command is available in most currently used Windows systems but not Windows XP Home.

If you wish to clean an entire volume, there is a second command-line option in Windows Vista/7 operating system. There is a switch for the Format command that zeroes all sectors. It is format X: /p

This will zero sectors once. To do n passes, the command is format X: /p:n

This is a full format and differs from Cipher in that it removes everything, not just deleted files. It may take a long time. The command must be used with utmost care as the actual command you are using may involve additional switches.

If you want to erase the entire system, including Windows safely, then a third-party tool is required like Darik’s Boot and Nuke (DBAN) that operates from an external disk. DBAN can be downloaded for free from this link. Other options for erasing the drive securely are EraserCCleaner, File Shredder, SDelete, etc. These are light resources and doesn’t occupy much space in the drive.

By using the above-mentioned instructions you can erase the volume or drive securely. Software can also be used to easily clean up the drive securely.

Advertisement

No comments yet.

Leave a Comment