How to safely delete content from PCs and smartphones

Deleting data from storage media before selling PCs or smartphones will prevent anyone from recovering it. Here's how to do it in absolute safety

The rapid development of technology, combined with the policies of planned obsolescence that more and more companies seem to apply, brings with it inevitable risks to the safety and security of our data. If we don't take sufficient care of the information present in the memory disk, we risk putting it at the disposal of any malicious digital attacker.

It is not by chance that, when we talk about the operations to be carried out before selling a PC or a smartphone, we often refer to the need to safely erase data and information present in the hard disk or in the memory support present inside the device. So, even if you were able to resell your electronic gadget, we would have the certainty that no one (even a hacker) would be able to recover the deleted data and steal our information. Knowing how to erase data from hard drives and smartphones, therefore, is an operation of paramount importance, in order to run the risk of jeopardizing our digital identity.


Before talking about erasing data from memory media, it is worth spending a few words on encryption. Although the average user (most likely) is not aware of it, all operating systems provide tools that allow you to encrypt the entire contents of the storage media, be it a hard drive or a flash memory of a smartphone. What's the point of disk encryption, you ask? Very simple: even if you were to sell the computer or smartphone without wiping all the data, the buyer could never access the information inside, unless they know the unlock password. In short, enabling disk encryption (on macOS there is FileVault, on Linux LUKS, while Windows has BitDefender in Pro and Enterprise versions) is an additional security measure that will protect you from any forgetfulness or distractions.

Deleting data securely on Windows 10

Simply formatting the disk is of little use: Windows 10, in fact, will only delete the partition table (a kind of database in which the location of data within memory cells is indicated), while the data will remain in place: if someone wanted to, in short, could easily recover it. What you'll have to do, instead, is to use the DiskPart utility and take advantage of its tools to overwrite the data stored in the various cells with a neutral value.

To launch DiskPart we'll have to access the Advanced Recovery Tools (read here if you don't know how to do it), launch the Command Prompt and type the string DiskPart and give "Enter". Once the software is running, type in "list disk" and hit enter to see all the partitions on the disk you want to delete; type in "select disk #" where, instead of the hash mark, you enter the partition number, then type in "clean all" and wait patiently for the operation to complete.

Delete data safely on macOS

If you have an Apple computer, however, you'll just have to use Disk Utility and browse through the various options it provides. To find the software, just type "disk utility" in Spotlight (the icon in the shape of a magnifying glass, to be clear) and click on the corresponding icon. Once the program opens, click on the partition or disk you want to erase, then click on Security Options and set everything to maximum.

How to securely erase data from SSDs

The procedure just described may not be fully functional for solid-state disks. For this reason, manufacturers include tools within their disk management tools to help you securely erase the data contained within your SSD. If you want to format your drive with the certainty of preventing anyone from recovering your data, you'll have to download the program from the manufacturer's website and browse through the various utilities that are present to find the one that suits you.

Securely erase data from smartphones

Unlike Windows 10 and macOS, the operations to securely erase data on smartphones is actually the same, regardless of the operating system that mounts it. All you'll have to do is restore the device to factory settings and, taking advantage of the fact that memory encryption is enabled by default, no one will be able to recover deleted data from your iPhone or Android smartphone. In the green robot operating system you'll have to go to Settings > Backup and restore > Factory data restore and start the procedure; on iOS you'll have to go to Settings > General > Restore and follow the wizard.