A common misconception when deleting files is that they are completely removed from the hard drive. However, users should be aware that highly sensitive data can still be retrieved from a hard drive even after the files have been deleted because the data is not really gone. Files that are moved to the Recycle Bin (on Microsoft Windows) or Trash (on macOS) stay in those folders until the user empties them. Once they have been deleted from those folders, they are still located in the hard drive and can be retrieved with the right software.
Table of Contents
Deleting vs. erasing files
When a file is deleted from a hard drive, it is not erased. What is erased is the bit of information that points to the location of the file on the hard drive. The operating system uses these references to build the directory tree structure (the file allocation table), which consists of the file path for every other file on the hard drive. When the path is erased, the file essentially becomes invisible to the operating system. The file still exists, but the operating system doesn’t know how to find it. It is, however, relatively easy to retrieve deleted files with file recovery software.
Where do deleted files go?
As mentioned above, files that have been deleted still remain on a computer’s hard drive. The operating system does not know where to locate the file, so it becomes virtually invisible. Sometimes the file’s data remains intact after it’s been deleted, but sometimes it is broken into smaller pieces. If a user tries to recover a file after significant time has passed, they may only be able to recover fragments of the original instead of the whole file.
How to permanently erase files
The only way to completely erase a file with no trace is to overwrite the data. The operating system will eventually overwrite files that have no pointers in the directory tree structure, so the longer an unpointed file remains in the hard drive the greater the probability that it has been overwritten. There are also many “file erasing” software products like Eraser (for Windows) and CleanMyMac X (for macOS) that will permanently erase files by overwriting them.
Erasing cloud files
Most cloud storage providers like Google Drive or OneDrive store recently deleted files in a folder that’s akin to Trash on macOS or the Recycling Bin on Microsoft Windows. However, most cloud storage solutions operate on a data redundancy model that duplicates all data so it can be restored in the event of a disaster. Some providers also have a data retention policy that allows them to store data on the provider’s servers for an extended amount of time after a user deletes a file. Usually, users must contact the provider if they want to ensure their data has been completely erased.
This article was updated April 2021 by Kaiti Norton.