How To

How to permanently delete a file

Fabrizio Ferri-Benedetti


When you ‘delete’ a file, your PC lies: it hasn’t really been eliminated, only hidden.

Files are actually tough to get rid of. You need to do more than simply delete it or reformat the disk. Recovery tools are capable of finding traces of old data, especially if someone using them knows what to look for, or where to find it. To delete files, you’ll need special tools.

How to permanently delete a file

What happens when you delete a file?

The easiest way to understand why a PC doesn’t permanently delete files with the click of a button is to use a metaphor. Imagine that your hard drive is like a large field, where each file is a plot of land. Each plot has a different crop (data), an owner, permissions, and other properties.

Field of files

Plots of land seen from space. If it were a hard disk, each would be a file.

When you tell the system to delete a file, it takes the plot-file and removes the fences, allowing anyone to jump in and start growing a different crop. If someone comes to the plot before it has been invaded by weeds (temporary files), or before it has been farmed again, they can recover much of the previous crop (recover data).


With SpaceSniffer, the hard drive looks like fields…

The only way to eliminate the newly released crop is by the secure deletion of data. Why doesn’t the OS do it? Because it’s a slow and difficult process. A quick deletion is very convenient because freeing up the space being used by a file takes much less time than actually erasing it.

When should you delete a file forever?

There are situations when you should delete files securely. By erasing data, you’re preserving confidentiality and privacy. Securely deleting files from a computer is the equivalent of shredding paper.

This is especially important for shared or public computers, or when dealing with confidential information.

Shared computers

When working on a shared computer, it’s very important to delete files securely (source)

If you want to delete a file once and for all, you have to use programs that make use of secure erasure methods. One of the most complete programs for Windows is Hardwipe. Here, I’ll explain how it works.

1. Install Hardwipe

The first thing you need to do is install Hardwipe. There are more secure erasure tools, some of which are included in antivirus and security suites, but I like Hardwipe because of its ease of use and all of the options it offers.

Hardwipe setup

Hardwipe is also available as a portable version. The language packs are downloaded separately.

2. Open the Hardwipe options

Before a secure erasure, I recommend you spending a minute or two setting up Hardwipe. Open it from the Start menu and go to Tools > Options. Then click on the Wipe Options tab.

Hardwipe options

What you’ll see is the Hardwipe erasure options. In the first menu, you should see several methods– some names like Gutmann o DoD 5220 might even sound familiar. Each method is different in its efficiency and performance in the number of passes, security, and erasure speed.

A single zero or random overwrite, for example, is faster than the 35 pass of the Gutmann method, but is less effective with professional tools like those used in computer forensics, so it’s a matter of trying the different methods. I recommend you to start by using the DOD 5520.22-M (three pass).

3. Right click on a file or folder and select Hardwipe

Time to erase. When you want to delete a file or folder permanently, simply right-click to open the context menu of Windows, and then open Hardwipe’s menu and select the Wipe File option (secure erasure).

Wipe file

4. Wait until Hardwipe has finished

It takes longer than normal to delete a fire securely. Depending on the method chosen and the amount of data to be deleted, it’ll take more or less time. The power of your PC also can also affect the erasure speed.

Hardwipe erasing

Hardwipe lets you set up if you want to turn off the PC once the deletion is completed.

Don’t forget about the space you’ve freed up

If you’ve deleted files previously, their ‘remains’ will be in the free space of your hard drive. Since you can’t select them –you can’t see them– you have to tell Hardwipe to free up the space.

Free up space

From the Hardwipe window, click on the third button (Free Space), choose the drive and confirm. After deleting the free space, no traditional recovery program will be able to find any traces of the data on the hard disk.

If you want to figure out which files are taking up the most space, check out our tutorial showing you how to use Space Sniffer.

You may also like