Ubuntu: How To Delete Your Files (Or Wipe Your Hard Drive) Beyond Recovery

How confident are you that when you “delete” a file, it really get deleted/removed/erased/wiped from your hard disk?

The fact is, the “delete” command does not remove your file(s). It simply tells your system to free up the space for other data. Until the space been filled with new data, your file(s) will still remain on the disk itself. That is to say, with some simple recovery tools, the files can be easily recovered. Now, if you want to completely eradicate porns files that contain sensitive information, you have to do more than just delete and empty trash.

Shred is a shell command that allows you to securely erase any files. It overwrites the specified file(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.

Shred is included in many Linux distributions, thus you can use it immediately, without any further installation.

To shred a file,


-f: change permissions to allow writing if necessary
-v: verbose, to display the progress
-z: add a final overwrite with zeros to hide shredding
-u: truncate and remove file after overwriting

ubuntu shred screenshot1

ubuntu shred screenshot2

You can type shred --help to display a list of options.

Adding shred to Nautilus menu

You can also add shred to your nautilus menu for convenience sake.

1. Install “nautilus-actions” from your Synaptic Package Manager, or in the terminal, type

2. Open up Nautilus Actions Configuration (System -> Preference -> Nautilus Actions Configuration)

3. Click Add.

ubuntu shred screenshot3

4. Fill in the following details:

Label: Shred
Tooltip: Use the shred utility to securely erase files
Icon: gtk-dialog-warning
Path: shred
Parameters: -f -u -v -z %M

5. Click on the “Conditions” tab

ubuntu shred screenshot4

6. Under the “Appears if selection contains”, check “both”

7. Check the box “Appears if selection has multiple files or folders”. Click OK

8. Open up a terminal, type

Now right click on any files, you should be able to see the “shred” command in the menu.

Note: While this is a useful tool to erase files, it is not guaranteed to be effective in the following conditions:

  • log-structured or journaled file systems, such as XFS and Ext3
  • file systems that write redundant data and carry on even if some writes
  • fail, such as RAID-based file systems
  • file systems that make snapshots, such as Network Appliance’s NFS server
  • file systems that cache in temporary locations, such as NFS version 3 clients
  • compressed file systems


  1. as a poor old duffer i would like to know how to delete compress files in a language i understand

    1. When you say compress files, do you mean those zipped or tar files? If you just want to delete them, you can easily do so by selecting them, right click and select Move to Trash

  2. Seems to work well enough.

  3. hey guys, i got a new asus pro50gl lappy and it had vista on it, i want to put XP on there but it wont let me when i go into BIOS ect, change to first boot bla bla when it loads blue screen and says ” stating windows set up ” it comes to a blue screen saying ” we have detected a problem bl bla” how do i completely wipe the drive so i can start fresh

    1. There are several software out there that allow you to wipe your hard drive, but the one that I recommend is Gparted – http://gparted.sourceforge.net/.

      Alternatively, you can download a Ubuntu LiveCD, boot it and fix your hard drive from there.

  4. It works just perfectly!

Comments are closed.

Sponsored Stories