This question already has an answer here:

this might seem a very basic question but i have been thinking about this a lot. The thing i know about deleted files is that it doesn't really disappear from the hard disk. It simply get unlisted from sort of a data structure that contains the files and their info or it get overwritten(not sure). My questions are:

  • Did i describe it correctly at the beginning? If not please correct me.

  • Where do deleted files go physically? In what part of the hard disk?

  • if a storage device has a limited space(it certainly does), How can it contain an endless amount of deleted files along with the actual files in it?

marked as duplicate by Moab, DavidPostill, Keltari, fixer1234, karel Sep 10 '15 at 3:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • They don't move, they are marked as deleted and removed from the master file table, if put in recycle bin they are marked as deleted but not removed from the master file table and can be restored. Nothing is overwritten until the space of the permanently deleted file is used by another file or disk write operation. – Moab Sep 9 '15 at 15:13
  • 1
    This depends on the file system. Please define whether you have NTFS or FAT or ... – Thomas Weller Sep 9 '15 at 15:14
  • This also depends on the operating system ... – DavidPostill Sep 9 '15 at 15:16

On HDD (Hard Disk Drives/Mechanical drives), the space of a deleted file is only marked as usable after removing it, and its data (the bits and bytes) is still physically stays on the disk, until the OS decides to write some data over it (if you are fast enough, you are able to restore this data before it gets overwritten to beyond recover).

On SSD (Solid State Drives/NAND based drives), it's a lot more treaky to actually delete the file from the drive.
This article talks about a study, which concluded that it's nearly impossible to reliably delete data from an SSD.

Hope it answers your question.

  • Is that the way for all file systems and OSs? – onlyforthis Sep 9 '15 at 19:10
  • On the software side, it really depends on the file system you are using. As far as I know, on Windows (NTFS file system) and Linux (ext3/ext4 file systems), only the table of content of the partition is changed, so the file isn't actually deleted from the disk. – Mike Sep 9 '15 at 19:46

On mechanical drives, the space is marked as usable, the data is still there, until more data is written. On solid state, i believe that the file is just deleted. Correct me if wrong.

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