1
$\begingroup$

As far as I understand it, when you delete a file from trash/recycle bin the file isn't actually erased from memory but is instead marked as being okay to be over written.

So, my question is as to why this is the case. Is it simply for speed/convenience reasons or is actually deleting data just a much harder (or impossible) thing to do?

I ask because of the potential security vulnerabilities, such as reselling older hardware and etc.

$\endgroup$
5
$\begingroup$

There are two possible criticisms here, which should actually be leveled at the operating system, more accurately the file system:

  1. Why does the OS not superficially erase data when a file is erased?

  2. Why does the OS not thoroughly erase data when a file is erased?

Regarding point 1, historically speaking, you don't want to do this, since you might change your mind later on, and this way the data is still there. Of course, modern operating systems which have a recycle bin (some of them, say Linux and OS X, only implement this on their GUI) don't really benefit from this advantage. Rather, one reason you don't want to erase data superficially is that it is still possible to recover the data, say using lab analysis. Perhaps this is even feasible by reading the location many times and measuring the amount of errors. However, there is still something to gain here: malicious software would have a much harder time reading your data even if it is just erased superficially.

Regarding point 2, if you rigorously erased the data each time a file is erased, then you will probably shorten your hard drive's life. In addition, deletion would become a slow operation, which may hurt performance when many temporary files are created, a technique which had been common in the past.

If you really care about erasing your data before reselling older hardware, you can obtain software that will thoroughly erase the data and thus make it much harder to recover. If you're afraid that your hard drive, containing sensitive information, could be stolen at any point, then you should erase your sensitive data using the same kind of software.

It remains to consider the casual user who is worried about malicious software reading erased files. Such a user could benefit from superficial erasure of files. I am not aware of any file system providing this service.

If you're not using an actual hard drive but some other storage device, you might encounter other difficulties, check out this question on askubuntu.

As a workaround, and as suggested by the answers to the aforementioned question, you can encrypt your hard drive instead.

$\endgroup$
  • 3
    $\begingroup$ "I am not aware of any file system providing this service." Actually, Mac OSX has a "secure empty trash" feature which writes a random pattern of bits over the erased file. $\endgroup$ – gardenhead Jul 8 '14 at 22:37
2
$\begingroup$

Because the process of actually erasing a file so that it cannot be recovered may be time consuming depending on the size of the file. Every space in which the file exists needs to be rewritten, either randomly or with a consistent pattern. It is much easier for the computer to "forget" the address of the given file and allow that space in memory to be overwritten. Also you may want to recover the data at a later point at this process, at least for a time, facilitates this.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.