Forget the recycle bin, here’s how to really delete files from your computer & phone

Garikai Dzoma Avatar

Ubuntu honestly tells you it does not delete files.

We have all done it countless of times, on our phones, tablets and laptops. Deleting files is a menial part of the digital age. The delete sequence is burned in our brains: You right click/long press the icon of the file to be deleted, select delete and the file will disappear into the digital ether never to be seen again. Right?

Well, if you believe this then you have been doing it all wrong. It would be my sincere hope that you are better than one of my aunts who calls me every six months to complain that although she has taken care to delete everything she does not need, she keeps running out of space. In Windows, you need to empty take the additional step of emptying the Recycle Bin.

The truth is what you have heard from those cheesy tech and investigation shows is true, deleting a file this way does not really delete it. Linux GUI tools are a little bit more honest in this regard. They clearly show you that you are moving the file to the trash folder and then allow you to empty the trash.

It’s just like in the old days when we still had functional City Councils and emptying the trash meant putting it in a bin just outside your gate.

If you were quick enough and rushed to the bin you could fish out your naughty magazine that your mum would have thrown in there before the city truck came along. Similarly, your neighbour could take a peek in there and know you have been having bacon and what not.

When you delete your files the regular way in Windows and Linux they are not really gone and if someone came along soon enough they can recover them. Even the rm -rf command does not really delete files. When you “delete” the file the file deleting utility simply makes the file invisible and marks that part of the operating system as available.

Aeons later when you save new data that part of the hard-drive may be overwritten with new data but until then you or anyone can recover that data.This might be a good thing if you accidentally delete a file.

However just as businesses that deal with sensitive data know enough to use shredders there are situations when you want to make sure that data is not available. For example just before you sell your computer.

Lazy people just do a quick format and install a new Windows OS. Some of the data on such a device could still be recovered by the new owner. If you deal with valuable data your rivals can make it a habit of buying your old laptops!

How to really delete data on Windows

There are several utilities that can help you to securely delete your files but in my opinion, CCleaner does the job well enough it’s the only file deleting utility you will ever need. You can also use it to clean your registry to remove errors and delete lurking keys of uninstalled software.

  • Delete your files the normal way
  • Empty them from the Recycle Bin
  • Download CCleaner from here
  • Select Tools > Drive Wiper
  • Select Free Space
  • Use complex Overwrite (7 passes) even the NSA cannot come back from that
  • Click on wipe

NB Due to the nature of SSDs wiping them this way might not work so you would do well to use full drive encryption in such cases. Alternatively, you can wipe the entire drive.

How to delete files on Ubuntu/Linux

The good people who use FOSS have always had security as a priority. To help you dispose of your files securely most Linux distros come with “shred” an aptly named utility that will make it hard to recover your files once you shred them.

  • Before you delete the file the normal way issue the command: shred /path/to/file.This will overwrite the file with gibberish.
  • Delete the file using the command: rm -rf or whatever method you prefer
  • Alternatively, you can overwrite and delete the file using the command: shred -u /path/to/file. This overwrites and gets rid of the file at the same time.
  • The -n flag allows you to specifies the number of overwrite passes to be performed on the file. e.g. shred -n 10 -u /path/to/file

Android

  • Install the Secure Delete App
  • Launch the app
  • Use it to securely delete any file and folder you want to disappear

While securely deleting files and folders will afford you some level of protection, you will benefit more if you use encryption and other forms of security to protect yourself.

,

10 comments

  1. The Deb

    In linux you could do “sudo rm -rf folder-name ” Always does the trick.

    1. Macd Chip

      using rm with the f flag is not advisable, very dangerous but yes it does the job very well.

    2. peterc

      You don’t need the recursive flag all the time. Also, “sudo” is bad in case you accidentally try and delete from your root directory. rm was a bit of a problem to me so, I created an alias “rm” that maps to “rm -i”. Not the smartest thing to do but at least I get a chance to confirm before I delete something very important. Imagine deleting a file that hasn’t been checked into VCS.

  2. Macd Chip

    This is where l prefer Linux Mint which is a spinoff of Ubuntu. When you right click a file, it gives you two options among others, either to move to trash or delete. Delete means that, deleting from the system.

    Another little feature l like is the option to open a file or folder as admin. This have led me to install lLinux Mint in production machines than Ubuntu.

    But when it comes to laptops, Mint doesnt know how to handle batteries and you laptop can easily overheat hence slow down. I use ubuntu instead, which is really good on batteries, but l have to hunt and install all the features l like from Mint

    1. peterc

      I think the trash feature comes with Nemo or Nautilus in Debian not Mint itself

  3. TSA-The_Serial_Analyst

    Ummmm Macd Chip u know too much. Where can I find you

    1. Macd Chip

      Look around techzim lm very easy to spot!!

  4. Anonymous

    nerds

  5. Linus Tovalds Muchemedzi

    Linux is meant to operate from the terminal. You should stay away from using the mouse, i repeat, stay away from using the mouse. So please stop right clicking stuff, its reserved for Windows guys right. I get mad real mad you hear me? If i find out you still doing that i will……..did i just go out of line?

    1. Macd Chip

      No, but there are situations where you have to gently drop someone new to linux into it, command line is not the best to start and Fedora or Centos is not the best for introductions.

2023 © Techzim All rights reserved. Hosted By Cloud Unboxed