Delete information safely with secure-delete

For those like me who are paranoid and want to remove information from their system in a way that is irrecoverable (or almost), here is a solution.

Let's install the package: secure-delete

Then it will be enough to use the command srm and it will erase the directory or file that we want safely.

How does this work?

Simple. When we normally delete something from our system, in reality that information was not eliminated, but in the HDD it was «pointed out» that the sectors that occupy this data are 'empty', then when we copy something new to our HDD over time, little by Little is really being eliminated from the information that occupies those sectors previously indicated or marked.

Well, srm what it does is delete that information as we normally do, but not only this, but it writes and deletes several times in the same space that the deleted information occupied, that is, it deletes and writes, deletes and writes, in this way makes it almost impossibleunless they have specialized equipment like CIA, FBI, NSA, etc. haha) to be able to recover the deleted information.

For example, to delete a file it would be:

srm mis-passwords.txt

If I want to delete a folder with all its contents:

srm -r carpeta-personal/

This I clarify, it will take a long time, but much longer than normal. Remember that it is written and erased several times, obviously this will take up much more time than normal. But of course ... if something wants something it costs him, if we want to eliminate information as safely as possible, it will take us some time 😉

However, if you want it to take less time, you can use the parameter -l What this does is that it will only be written and erased twice, it will speed up the erasure process but it will not be as secure as it is by default.

Anyway, I don't think there is much more to add.

regards


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

15 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   elav said

    Poor hard drive that falls into your hands. Do you think that erasing-writing so many times in the same sector is good? Mother of mine .. xDD

    1.    msx said

      But for emergencies ...

    2.    Manuel de la Fuente said

      Now I understand why so many hard drives have exploded, hahaha. The one of things like this that he will do to the poor. o_O

    3.    KZKG ^ Gaara said

      I give the options, the user is free to choose whether to use them or not 😉

    4.    Gonzalo said

      If you don't want the file to be recovered, it's worth it
      Do you know how many times you have written in the same sectors of your disk? Or do you think that your disk is infinite and never overwrites sectors?

  2.   tannhausser said

    Interesting the program, did not know it. Until now I used Bleachbit or the same Shred that allows you to choose the number of times to overwrite a file, now we have one more option for when the CIA call the door xDD

  3.   commentator said

    The only way to safely erase (And that for now) is physical destruction.

    1.    msx said

      Physical destruction is obviously the safest way, now either using the methods recommended by specialists or the DoD it is impossible to impossible to recover relevant information, hopefully isolated fragments that unless it is complemented with some other type of test or data alone will not have no value.

      1.    msx said

        * impossible impossibly hahahaha: facepalm:

    2.    taregon said

      I don't have enough money to buy a hard drive every time I want to hide my misdeeds 0.o

      1.    msx said

        Man, for that there are encryption technologies, right here there are good articles on the subject.

    3.    lawliet said

      You could rewrite the entire hard drive with random data

  4.   Bill said

    Good resource, maybe the name of the Post should be "Delete files permanently"
    Because "insurance" is relative, poor hard drive. XD.

  5.   SynFlag said

    I think it is not necessary, for years there is a command called shred.
    $ shred -u pass.txt

    If you are more paranoid:

    $ shred -n 200 -z -u pass.txt

    1.    Konozidus said

      Have you read $ man shred?

      It clearly says that in modern file systems it could overwrite in a different physical address than the file to be deleted, and among others it specifies ext3, so I suppose that in ext4 due to its similarities it will not guarantee operation either.

      If you use such a tool it is because you want to be sure that the correct physical addresses are deleted and overwritten, so it is pretty useless these days, unless you are using outdated file systems like fat32, ext2, etc.