- Deleting files from the Recycle Bin or using shortcuts does not erase the content; it only marks the space as reusable and allows for its recovery with specialized software.
- For truly secure erasure, it is necessary to overwrite the data with tools such as Eraser, SDelete, DBAN, or manufacturer-specific utilities.
- For SSDs, the recommended approach is either full disk encryption and key destruction, or the use of built-in secure erase functions.
- In highly demanding environments, logical techniques can be combined with controlled physical destruction of the units to minimize any residual risk.
Many users assume that emptying the Recycle Bin means their files are gone forever . Nothing could be further from the truth: in most cases, that data is still on the disk and can be recovered with free recovery tools . If you're selling your PC, recycling a hard drive, or simply want to get rid of sensitive documents, you'll want to learn how to delete files safely and permanently.
In the following lines, you'll find a comprehensive guide, based on various specialized sources, explaining all the methods for permanently deleting files : from utilities like Eraser or SDelete, to Windows commands, third-party solutions, HDD and SSD erasure, and even radical physical destruction options. You'll also see what actually happens when you "delete" a file , the security risks involved in not doing it correctly, and how to choose the right technique for each situation.
What really happens when you delete a file in Windows or macOS?
When you press Delete on a document in Windows, the system doesn't immediately erase the data from the disk . Instead, it moves the file to the Recycle Bin, where it remains until you empty it or restore it to its original location.
Even after emptying the Recycle Bin, the file's contents remain in the same physical location on the disk; the space is simply marked as available for reuse . The system deletes the reference in the file table, but the bits remain until other data overwrites them. As long as that overwriting doesn't occur, a recovery program can reconstruct the information quite easily.
On macOS, the process is similar: when you send a file to the Trash and "delete" it, the contents aren't immediately erased . Again, the space is freed up logically, but the physical content can remain for quite some time.
This reality means that any device you grant access to, sell, or recycle could still contain private documents : photos, payslips, medical reports, exported emails, WiFi passwords, bank details… If a third party uses tools like Recuva, PhotoRec, or other recovery programs, they have a good chance of retrieving that information.
Differences between HDD and SSD when deleting data

To choose the right secure erase method, it's crucial to understand how different types of drives store data and how to avoid errors when installing an SSD . In a mechanical hard drive (HDD), data is stored in contiguous blocks on magnetic platters . When a file is deleted, the system marks those blocks as free, but the magnetism representing the bits remains until another write operation alters it.
A solid-state drive (SSD) takes a different approach. Instead of magnetic platters, it uses flash memory chips, and the internal controller performs wear leveling : it distributes writes across the drive to extend its lifespan. This means that attempting to "overwrite the same sector 10 times" doesn't guarantee, in practice, that you're actually overwriting the exact same chips where the original file was located.
Furthermore, SSDs operate with blocks that are erased together and use commands like TRIM . When the operating system marks a file as deleted, it can send the SSD the command that those logical blocks no longer contain valid data, so that, in subsequent internal cleanup processes, that information is physically erased.
Therefore, classic multi-pass overwrite methods designed for HDDs (such as the well-known 35-pass Gutmann scheme) are not always effective or necessary for SSDs . For these drives, it's advisable to use options like the manufacturer's "secure erase" feature, specialized TRIM-compatible utilities, or even better, full disk encryption plus key destruction.
Why deleting files unsafely is a real risk
Simply emptying the Recycle Bin, deleting files from Explorer, or performing a quick format means that much of the data remains recoverable . Anyone with physical access to the computer, a USB drive, and some time can attempt to recover information using free tools.
This doesn't just affect files you remember deleting. Systems like Windows accumulate a large number of temporary files in folders like Temp , caches, automatic document backups, and previous versions that allow you, for example, to restore a Word or Excel file that was unexpectedly closed. All of this can contain highly sensitive data that you're unaware exists.
In corporate or educational environments, things get even more complicated: research documents, databases with personal information, internal reports… If these disks are reused, resold or disposed of without secure and documented erasure , it opens the door to data leaks and security breaches that are difficult to justify.
Even at home, personal photos, ID scans, payslips, or medical records can become easy targets for identity theft or fraud if they fall into the wrong hands. That's why, when a device is going to change ownership or leave your control, data destruction should be treated as an essential part of security , not a minor detail.
Securely delete specific files with Eraser
One of the classic programs for Windows is Eraser , a free tool that allows you to destroy files, folders, and free space by overwriting the sectors where they resided multiple times. Its goal is to make the information unrecoverable, even using advanced forensic software.
After installing Eraser on Windows (for example, version 6.2.0.2996 or later), you don't need to open its interface every time you want to use it. The program integrates with File Explorer and the Desktop, so you can launch secure erase from the context menu . Simply right-click on the file or folder, select "Eraser," and then "Erase."
The system will ask for confirmation, reminding you that the deletion will be permanent . Upon accepting, Eraser will add the operation to its task queue and begin overwriting the corresponding disk area. The default method is usually the 35-pass Gutmann scheme , which is extremely thorough but somewhat slow with large files.
If you open the Eraser interface, you can perform more advanced tasks: create scheduled tasks, choose different algorithms (for example, single-pass methods with pseudo-random data or standards such as British HMG IS5), delete trash and unused space , or adjust the frequency so that cleaning runs automatically.
On mechanical hard drives, a few passes with random data are more than enough to prevent practical file recovery . 35-pass methods are reserved for very demanding cases or contexts involving extremely sensitive information, assuming the process will take considerably longer.
Six ways to delete files in Windows (from simplest to most advanced)
Windows offers several ways to delete files, but only some are suitable if you're looking for truly reliable deletion. It's important to distinguish between logical deletion (Recycle Bin, shortcuts, Explorer) and actual overwriting of the content.
The simplest way is to use the context menu: right-click on the file and select "Delete." This sends the file to the Recycle Bin. As long as the Recycle Bin isn't empty, you can use "Undo Delete" or restore the file to its original location, so at this point, no deletion is actually complete.
When you empty the Recycle Bin, Windows marks that space as available, but as we know, the contents remain recoverable until the system overwrites them with new data. The same happens if you delete directly using keyboard shortcuts, such as Shift + Delete, which bypasses the Recycle Bin and marks the file as deleted without going through it.
Also, from the File Explorer ribbon, on the Home tab, you can choose "Delete" and, in some cases, "Permanently delete." Again, this option bypasses the Recycle Bin but doesn't perform a secure deletion ; it simply performs a more direct, logical deletion.
For more powerful operations, you can use the command prompt or PowerShell. The `/FC:\path\file` command from cmd forces deletion even if the file is marked as read-only, but it still doesn't overwrite data. With PowerShell, ` Remove-Item -Path C:\path\file -Recurse` allows you to delete entire files and directories, leaving them recoverable as long as they aren't physically overwritten.
Use of file destruction tools: SDelete and similar
To go a step further and ensure that the data is truly overwritten, there are specific utilities like SDelete (Secure Delete) , part of Microsoft's SysInternals suite. This command-line program is designed to overwrite the physical location where the file resided or to clean up the free space on the drive.
Once you've downloaded SDelete and extracted the ZIP file, you'll find the executable sdelete.exe. From a command prompt window with the appropriate permissions, you can use commands like `sdelete filename` to delete a specific file, or add parameters like `-s` and `-q` to act on folders recursively and silently.
When you want to ensure that all free disk space is cleaned up, you can run `sdelete -z` . This command writes data over the areas marked as free, so that any remnants of previously deleted files are destroyed . It's very useful after manually deleting large amounts of data that you don't want to be recoverable.
SDelete also offers the ability to control the number of passes applied to a location. Using, for example, `sdelete.exe -p 5 file` will overwrite the area where the file was located five times. More passes make recovery more difficult, but they also increase the processing time.
It's important to keep in mind that the effect of SDelete is permanent and irreversible . It shouldn't be used lightly, and you should always have backups of any data you want to keep, as once overwritten there's no reasonable way to recover it.
Additional software for secure erasure and optimization
Besides Eraser and SDelete, there are other free and paid tools designed to securely clean disks. Programs like DBAN (Darik's Boot and Nuke) are loaded from a CD or USB drive and allow you to erase all the contents of one or more drives using different erasure algorithms (DoD 5220.22-M, Gutmann, PRNG, etc.), making them very useful when you want to prepare a computer for recycling or disposal.
Other utilities, such as CCleaner or certain system optimizers, include modules to delete free space and temporary files , simultaneously improving computer performance by removing bloatware and unnecessary programs. This is the case, for example, with solutions like Avast Cleanup, which combine cleaning digital junk with suspending resource-intensive applications.
In the corporate sphere, there are encryption and data management tools like Atlansys Bastion Pro (distributed with some security products) that, in addition to encrypting drives and directories, offer guaranteed cryptographic erasure capabilities . Through the Explorer context menu, it's possible to select files or folders and instruct the tool to securely delete them, displaying detailed progress and allowing the process to be stopped, although without the possibility of recovering what has already been destroyed.
The choice between them will depend on whether you want to delete individual files , entire folders, free space, or entire disks; the type of drive (HDD or SSD); and whether it is a home or professional environment with stricter regulatory requirements.
Deleting free space with PowerShell and Windows commands
Although deleting files with PowerShell doesn't, in itself, permanently destroy the data, you can use certain functions to overwrite free space . One little-known resource is Windows encryption commands with specific modifiers, which allow you to write to all areas marked as free on a specific drive.
The typical workflow involves first manually deleting the files (and emptying the Recycle Bin so that Windows marks that space as available) and then launching a process that fills all free areas with random data or zeros, making any subsequent recovery attempt extremely difficult.
To do this, you can use commands from a PowerShell console with administrator privileges, specifying the drive letter and acting on a per-drive basis. The process can take a considerable amount of time on large drives or those with a lot of free space, but upon completion, virtually all traces of deleted files are overwritten.
This technique does not replace specialized tools in highly sensitive contexts, but for the average user it is a reasonable way to strengthen security without installing additional software, especially after deleting large volumes of personal data.
Formatting, PC reset, and complete system wipe
Another common question is whether formatting the disk or using the "Reset this PC" option in Windows achieves a truly permanent erasure . Generally, a quick format only reorganizes the logical structure of the file system, but doesn't overwrite all the content , so some data may still be recoverable with specialized tools.
In Windows 10 and 11, the reset function lets you choose whether to "keep my files" or "remove everything." Selecting "remove everything" and also enabling the "clean drive" option (in the advanced settings section) performs a much more thorough erasure process, designed to make data recovery difficult.
This procedure is very useful when you're going to sell or give away the entire computer and don't want to bother with external tools. However, it does mean losing absolutely all your data, programs, and settings, so you should back up everything you need to keep to another storage device beforehand.
In the case of modern SSDs, many manufacturers include a "secure erase" option in their management tools. This sends a specific command to the drive to reset all memory cells to a near-factory state. Along with full disk encryption, this is one of the best ways to erase an SSD without resorting to endless overwrites.
Automate the cleaning of temporary files and the Recycle Bin in Windows
The problem with temporary files and an overflowing Recycle Bin is that they accumulate without us noticing , becoming a goldmine of information for any attacker who gains access to the computer. Windows includes a "Storage Sense" system that you can activate to automatically empty the Recycle Bin and delete temporary files periodically.
To configure this, right-click on the Desktop, go to "Display settings," then to "System," and finally to "Storage." You'll see a switch that allows you to enable automatic deletion of unnecessary content. Once enabled, a panel will open where you can choose how often to clean the Recycle Bin, temporary application files, and other items you no longer need.
This automation has a clear drawback: when a file disappears this way, you can no longer recover previous versions or documents deleted by mistake , unless you have external backups. Therefore, it is recommended to combine this function with a backup policy for important data.
At the same time, it reduces the residual information footprint on the system, making it harder for malware or an attacker to find remnants of documents you thought were gone . It's not a "military" wipe, but it is a good step toward keeping digital junk under control.
Full disk encryption and key destruction: the elegant way
A very effective strategy, especially for SSDs and modern computers, is to encrypt the entire disk from the start . This way, even if someone manages to get hold of the physical drive, they won't be able to read anything without the decryption key, because the stored data is completely encrypted.
On Windows you can use tools like BitLocker , on macOS FileVault , and on Linux solutions like VeraCrypt or LUKS. Ideally, you should activate this encryption right after installing the operating system , before you start logging into online services or saving documents, to avoid leaving significant areas unencrypted.
The trick to using encryption as a secure destruction method is that, when you want to get rid of the computer or hard drive, you change the encryption password to a long, random one that you can't remember and delete all the files where it was stored. In practice, this is equivalent to destroying the key to a treasure chest: the data is still there, but it's impossible to read without the key.
In the specific case of SSDs, combining full encryption with this key destruction is one of the few truly simple and secure ways to ensure that the content remains inaccessible, without having to subject the drive to hundreds of overwrite passes or resort to physical destruction.
Physical destruction: when you can't afford any risks
There are scenarios (public bodies, companies with trade secrets, R&D departments, etc.) where even the combination of encryption and logical erasure is not considered sufficient, and physical methods of media destruction are chosen . This is where mechanical, thermal, and chemical solutions come into play.
On a mechanical level, while the image of a hammer and nail might be tempting, it doesn't guarantee that the data is unrecoverable . There are industrial shredders specifically designed for hard drives that completely deform the platters, or smoothing machines capable of removing the ferromagnetic layer that stores the information, minimizing any possibility of readability.
In the thermal realm, units based on ferromagnetic coatings can be subjected to temperatures above their Curie point . In the case of chromium oxides used in some disks, this is approximately 113°C; once this temperature is reached in a controlled manner (for example, in a muffle furnace), the material loses its magnetic properties and the information it contained is effectively erased .
Finally, there is the chemical route: very aggressive mixtures such as the classic aqua regia (1 part of concentrated nitric acid to 3 parts of hydrochloric acid) are capable of completely dissolving the metallic components of a hard drive, erasing both the data and the medium itself.
These procedures, while radical, have obvious drawbacks: they are dangerous, expensive, and require suitable facilities (protections, ventilation, specialized equipment). They are usually reserved for very specific contexts and strict regulations; for most users and companies, a good combination of encryption, secure erasure tools, and clear device lifecycle management policies is sufficient.
If you choose to reuse computers instead of destroying them, it is essential that you first completely rewrite the data (either by using deletion tools or by encrypting and renewing the key) so that the new user cannot, either accidentally or intentionally, access the previous owner's files.
Ultimately, the key is understanding that a file doesn't magically disappear when you delete it; it leaves a trace that can remain for a long time. Choosing the right method—whether logical deletion, overwriting, encryption, specialized utilities, or, in extreme cases, physical destruction—is what makes the difference between simply "getting rid of it" and truly secure data removal .

