Today I will show you how to permanently delete a file or hard drive so that data can not be recovered using data recovery tools. This comes in handy when you have sensitive data you need to get rid of.
For the purpose of this tutorial I will be using Linux Mint 17 (steps work on all Linux distributions) however if you have a Windows system boot the system with a Linux Live CD and mount the hard disk. This tutorial will show you how. Once this is done you can then use the steps outlined below.
To delete data securely we are going to use a tool called Shred. Shred comes preinstalled on Linux so you don’t need to install it. The following example will show you how it works.
Open up a terminal and create a file called test1 on your desktop by typing:
sudo touch /home/chris/Desktop/test1
Now we need to enter some data into the file so type:
sudo nano /home/chris/Desktop/test1
This will open up the file as shown below. Enter whatever data you like into the file and then save and exit.
Now it is time to delete some data. In your teminal type:
sudo shred /home/chris/Desktop/test1
As can be seen from the screenshot above Shred has completely scrambled all the data inside the file test1 making it unreadable.
All that is left is to delete the file so type:
sudo shred -u /home/chris/Desktop/test1
Shred will then overwrite the data 25 times with garbage while also renaming the file 11 times. Your data is no gone.
To perform this operation on a hard drive you would open up a terminal and type the following:
sudo shred /dev/hda
where hda is your hard drive and /dev/hda is the mount point. This would take some time to delete all the stuff on the drive so be patient.
About the Author
Follow @Comtech247 on Twitter