I have a very simple question. Where do files go when you delete them?

I know when I send files to "Trash", they go to "trash", but when I delete them, I do not know where they go.

  • Use bleachbit to wipe files securely – Sergiy Kolodyazhnyy Mar 26 '15 at 21:34
  • 1
    @Serg - the OP is not asking how to securely delete files, they are concerned with locating secret files and crackers. There are tons of tools for secure deletion from dd to scrub – Panther Mar 26 '15 at 21:41

Basically when you delete a file ("empty the trash") the index entry to the file is deleted, but the file information is not scrubbed off the disk. As explained in this Ubuntu wiki page:

This is because in Unix file systems, files are indexed by a number, called the inode, and each inode has several attributes associated with it, like permissions, name, etc. When you delete a file, what really happens is the inode is unlinked from the filename, but if some other program is using the file, it still has a link open to the OS, and will continue to be updated. A file is not really deleted until all links have been removed (even then, the data is still on the disk, but not indexed in anyway and thus very hard to recover).

  • 5
    +1 on Organic Marble's post which is very true, I'd like to remark that as he said even if all links to the file are actually removed, the file is actually still there (quoting his answer, "even then, the data is still on the disk, but not indexed in anyway and thus very hard to recover"). But in fact many files are very easy to recover, because every "kind" of file has its very own structure which is very easy to detect even after deletion, and almost any file not overwritten is actually very easy to recover with the appropriate tool. Keep that in mind – kos Apr 3 '15 at 3:20

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.