Securely Wiping Data From A Device
When you delete a file on your system, it just removes the reference to that file rather than literally delete it from the system. A good analogy here is to think of your file as a page in a book. When you delete the file you are ripping out the contents page of the book, removing the reference to your page so it can no longer be easily looked up. But the page itself still exists, and it can be found by anyone who is willing to just look through the entire book until they find it. Lots of people have discovered that the hard way, giving away or selling an old computer full of sensitive financial information and suffering fraud, or worse.
To truly remove data from a device, such that it can no longer be recovered, you need to overwrite it by replacing the old data with new, gibberish data. Below are the procedures I would recommend
Type Of Device | Procedure | HDD | Download and boot ShredOS on a live USB and run the 3-pass DoD wipe on the HDD |
---|---|
SSD | Download and boot PartedMagic on a live USB and run either the ATA or NVME Secure Erase on the SSD depending on what type it is |
Android | To Be Added |
iPhone | To Be Added |
USB Flash Drive | On Linux, open a terminal and run dd if=/dev/urandom of=/path/to/usb to overwrite the entire USB stick with pseudorandom data. You must run this command twice, in order to be reasonably sure that you've also wiped any overprovisioning space
On Windows, download Eraser and run the 3-pass DoD wipe on any files currently on the USB. Once this is done, run the "Erase unused space" option on the USB. Once completed, run the "Erase unused space" option once more, to account for any overprovisioning space. |
SD Card | Same process as USB flash drive |
Individual Files | On a HDD use the secure erase feature on Eraser or CCleaner to overwrite specific files. Use the 3-pass wipe, or optionally more passes if you like. You can't reliably erase individual files on an SSD or flash media. Instead, you can protect them from prying eyes by using full disk encryption on the drive before storing any sensitive data on it. I recommend Truecrypt (Version 7.1a - Download here) for full disk encryption if you are using Windows, and LUKS for Linux systems. |