Deleted files can be recovered using recovery programs, is there any way to completely remove the files?
2 Answers
in short: yes, but no...
You cannot make the physical media to appear "as new", but you can hide the original content of the file.
ubuntu has the program shred
pre installed. This overwrites the file with merily ramdom data.
Unfortunatel there may have been written some temporary files with the same content while editing it. The location, the names and the number of this copies depend on the editing program. Its almost impossible to find them all, especially if the editing program deleted them itself. In that case you would have to use a recovering mechanizm to find the temorarry copy(-ies).
So if you want to be sure to remove a file in an unrecoverable way the only option is to make a freash (file based) backup of all disks after deleting the file, fill the discs with random data (using dd if=/dev/random of=/dev/sd?/
baybe more than once) and recover from the backup.
I think this is less of a problem with SSDs, but I'm not sure about it.

- 294
- 1
- 9
There is a workaround: Install Ubuntu with encrypted disk. Without the passphrase, it is impossible for 'normal mortal people' to crack the encryption, but when logged in and connected to the internet, the system can be attacked.

- 46,324
- 5
- 88
- 152
/dev/random
has horrible read speed because it returns random data based on real gathered environmental entropy./dev/urandom
would be faster because it uses an entropy pool and pseudorandom generator, but still significantly slower than your disk write speed. Just use/dev/zero
as input, that one simply produces zeroes and has nearly unlimited read speed. Also, securely erasing files on SSDs is not easier but impossible. You can only erase the whole disk by sending an ATA Secure Erase command to the SSD's disk controller. – Byte Commander Jan 13 '17 at 07:04