Deleting files you no longer need is an important part of maintaining your computer’s performance. When you delete a file, it isn’t actually erased from your hard drive immediately. Instead, the reference to the file is removed from your operating system, and the space it occupied is marked as available for new data. Until that space is overwritten, the deleted file remains on your hard drive and could potentially be recovered. If you want to ensure a file is permanently deleted and unable to be recovered, you need to take additional steps beyond just deleting it normally.
Why Permanently Delete Files?
Here are some key reasons you may want to permanently delete files from your hard drive:
- Privacy – To prevent personal or sensitive information from being recovered by someone else accessing your computer.
- Security – Deleted files could potentially be recovered and used by hackers or malware. Permanent deletion reduces this risk.
- Free up space – You may want to maximize available hard drive space by completely purging unwanted files.
- Cover your tracks – If you want to delete evidence of sensitive activities on your computer.
When you normally delete a file, the space it occupied is marked as available to be overwritten, but the actual data remains on the hard drive until it gets overwritten by new data. This means the files could conceivably be recovered until they get overwritten. So for sensitive files, more steps are required to permanently remove them.
How Deleting a File Normally Works
When you delete a file in your operating system like Windows, macOS, or Linux, here is a simplified overview of what happens behind the scenes:
- The reference to the file in the file system table is removed, so it no longer appears in your folder directory.
- The space occupied by the deleted file is now marked as available to be overwritten.
- The actual data of the deleted file remains in place on the hard drive until the space is needed for new data.
- When the space is overwritten, the old file data is replaced by the new data.
- Once fully overwritten, the deleted file is no longer recoverable through data recovery software.
As you can see, a normally deleted file sticks around on the hard drive until the space it occupies gets reused. This makes recovery possible with data recovery tools. To prevent that possibility, more thorough deletion is required.
Ways to Permanently Delete Files
Here are some options for permanently deleting files from your hard drive:
Using Permanent Delete Software
Special software tools are designed to permanently erase files making recovery impossible. They overwrite the space used by a deleted file multiple times with random data to completely scrub the original contents.
- Eraser (Windows)
- Permanent Eraser (Mac)
- Shred (Linux)
This is the most thorough and reliable way to permanently delete files. The drawback is it can be slow to overwrite data multiple times.
Wiping Free Space
Rather than targeting specific files, you can wipe the free space on your hard drive. This will overwrite any deleted file remnants with random data.
You can use disk utility tools like:
- Disk Cleanup on Windows
- Secure Erase Free Space on Mac
- Shred or Wipe tools on Linux
This doesn’t erase files you’ve deleted individually, but prevents recovery of any old deleted data.
Using the Command Line
On Windows, Mac, and Linux you can delete files via the command line interface. This may allow more secure deletion than using the graphical interface.
For example, on Windows you can use the command line tool Cipher:
On Linux and Mac you can use the shred command:
shred -vfz -n 10 file_to_delete
Using command line deletion gives you more control and security than standard graphical deletion.
Physically Destroying the Hard Drive
If you want to guarantee no data is recoverable, physically destroying the hard drive is an option. This will render all data unrecoverable, but also makes the drive unusable.
- Using a hammer to damage the platters and mechanisms inside the hard drive casing.
- Drilling holes through the drive.
- Degaussing the drive using strong magnets to disrupt the magnetic data storage.
- Incinerating the drive.
This is overkill for most casual users, but may be required for highly sensitive data.
Tips for Permanent File Deletion
Follow these tips when attempting to permanently delete files:
- Use dedicated data destruction software for thorough and reliable file erasure.
- Delete files using the command line instead of your operating system’s graphical interface when possible.
- Overwrite free space on your drive to wipe old deleted file remnants.
- Be prepared for permanent deletion processes to take a long time due to the overwrite operations.
- Consider physically destroying drives containing highly sensitive data if recovery absolutely cannot be risked.
- Remember solid state drives (SSDs) handle deletion differently than traditional hard disk drives due to wear leveling algorithms.
Recovering a Deleted File
If you deleted a file by accident and need to try to recover it, follow these steps:
- Avoid writing any new data to the drive containing the deleted file. Overwriting can make recovery impossible.
- Use data recovery software designed to scan the drive and retrieve deleted data. Popular tools include:
- Recuva (Windows)
- Data Rescue (Mac)
- Photorec (Linux)
- The sooner you run the recovery, the better, before the deleted file’s space is reused.
- Recovery success depends on the deletion method and how much overwriting of the data has occurred.
If you take immediate steps to recover a recently deleted file, before any overwriting can happen, the chances of full recovery are generally very good.
Permanently deleting files requires overwriting the data to scrub it from your hard drive platters and prevent any sort of file recovery. While simple file deletion only removes file system references to the data, permanent deletion ensures the raw data itself is wiped out. This requires using special software tools, free space wipes, physical destruction, or command line overrides of the default delete process. When done properly, permanent deletion allows you to securely erase any file so it can never be recovered by someone else accessing the drive.