Deleting frees up space HDD

eldapeeze

Honorable
Dec 23, 2012
135
0
10,710
My understanding of deleting files from a OS on a HDD, is that it doesn't delete the file, all you do is delete the file path to the file. So if the file is still on the Hdd, how can that free up space on the Hard drive? I've never understood this concept. Any help would be appreciated.

Thanks. Matt
 
Solution
Ok Harddrives are like a book. The have a table of of contents that tells the drive exactly where every piece of a file is stored. This is called the File allocation table (Fat) and the pieces where files are stored ar clusters. Any Cluster of the HDD not being used is available to be written to. When you delete a file all that happens is that the entry is deleted from the fat which in turn makes all those clusters free to be written to. The actual cluster does not get erased*. This is why file retrieval programs can work so easily. They just scan the whole drive and compares what it finds in the clusters to whats in the Fat.

If you need to actually erase whats in the clusters when you delete a file (this will slow you down alot)...

dingo07

Distinguished
deleting a file from a drive removes the physical space the file takes up (increasing the amount of free space on the drive), but never actually removes the impression of that file until another piece of data overwrites where it was stored
 

popatim

Titan
Moderator
Ok Harddrives are like a book. The have a table of of contents that tells the drive exactly where every piece of a file is stored. This is called the File allocation table (Fat) and the pieces where files are stored ar clusters. Any Cluster of the HDD not being used is available to be written to. When you delete a file all that happens is that the entry is deleted from the fat which in turn makes all those clusters free to be written to. The actual cluster does not get erased*. This is why file retrieval programs can work so easily. They just scan the whole drive and compares what it finds in the clusters to whats in the Fat.

If you need to actually erase whats in the clusters when you delete a file (this will slow you down alot) there are several free utilities to do this. Check reviews for products offering secure erase or secure delete. If you want to erase a drive completely a full format will normally handle this but be warned data is still recoverable with more sophisticated software and a military grade wipe should be done. A good free one is Darik Boot And Nuke (DBAN).

* Hdd's don't need to erase, they can just write over the top of existing data and replace it in one swoop.
SSD's do need to erase first which is why giving them time to do garbage collection and trim is important in maintaining high performance.
 
Solution