Your computer’s storage (HDD or SSD) is like a bookshelf wherein each book has a sticky note on it. The sticky note has one of two words, “occupied”/ “free”. Deleting a file simply means replacing an “occupied” sticky note with “free”. To really delete a file you would have to overwrite it, that is replace one book with another.

  • When you delete a file, you’re simply toggling the availability field of the file’s row in the filesystem’s File Allocation Table
  • There isn’t any hardware change associated with a file deletion
  • Thus one can use specialised software tools that fetch the rows of the file allocation table that are marked “free” to retrieve deleted data

Truly deleting a file

You can truly delete a file by overwriting it, this will change the data in the hardware level i.e, change the magnetic field directions arbitrarily in a HDD and changing the electrical charge in a SSD

Overwrite multiple times

  • In a HDD, even after overwriting a sector, residual magnetic fields could exist. These can be picked up using Magnetic Force Microscopy (MFM)