- 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, when they empty the Recycle Bin, Their files have disappeared foreverNothing could be further from the truth: in most cases, that data is still present on the disk and can recover with free recovery toolsIf you're going to sell your PC, recycle a hard drive, or simply want to get rid of sensitive documents, you'll want to learn how to... securely and irretrievably delete files.
In the following lines you will find a very complete guide, based on various specialized sources, which explains All methods for permanently deleting filesFrom utilities like Eraser or SDelete, through Windows commands, third-party solutions, HDD and SSD erasure, to radical physical destruction options. You'll also see what really happens when you "delete" a fileWhat safety risks are involved in not doing it correctly, and how to choose the appropriate technique in each case.
What really happens when you delete a file in Windows or macOS?
When you press Delete on a document in Windows, the system It does not immediately erase the data from the disk.What it does is move it 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 reuseThe system deletes the reference in the file table, but the bits remain there until other data overwrites them. As long as that overwrite doesn't occur, a recovery program can Reconstructing the information is quite easy..
On macOS, the process is similar: when you send a file to the Trash and "delete" it, The contents are not cleaned immediatelyAgain, space is freed up at a logical level, but the physical content can remain for quite some time.
This reality means that any equipment you grant access to, sell, or recycle, It could still contain private documentsPhotos, payslips, medical reports, exported emails, Wi-Fi passwords, bank details… If a third party uses tools like Recuva, PhotoRec, or other recovery programs, there's a high chance of… retrieve that information.
Differences between HDD and SSD when deleting data
To choose the right secure erasure method, it's key to understand how different types of drives store data and how Avoiding mistakes when installing an SSDOn a mechanical hard disk drive (HDD), data is stored in contiguous blocks on magnetic platesWhen a file is deleted, the system marks those blocks as free, but the magnetic field representing the bits remains until another write alters it.
In a solid-state drive (SSD), the approach is different. Instead of magnetic platters, flash memory chips are used, and the internal controller performs the necessary operations. wear levelingDistribute writes across the entire drive to extend its lifespan. This means that attempting to "overwrite the same sector 10 times" does not guarantee, in practice, that you are overwriting the exact same chips where the original file was located.
Furthermore, SSDs operate with blocks that are erased together and use commands such as TRIMWhen 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 cleaning processes, they are removed. physically erase that information.
Therefore, classic multiple overwrite methods designed for HDDs (such as the famous 35-pass Gutmann scheme) They are not always effective or necessary on SSDsFor these drives, it's advisable to use options such as the manufacturer's own "secure erase," specialized utilities compatible with TRIM, or even better, full disk encryption + 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 recoverableAnyone with physical access to the computer, a USB drive, and some time can try to recover information using free tools.
This doesn't just affect files you remember deleting. Systems like Windows accumulate many temporary files in folders like TempCaches, automatic document backups, or previous versions allow you to, for example, restore a Word or Excel file that has been unexpectedly closed. All of this can contain very sensitive data that you are unaware they exist.
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 a secure and documented deletionThis opens the door to data leaks and security breaches that are difficult to justify.
Even at home, personal photos, ID scans, payslips, or health records can become a candy 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, it's advisable to treat data destruction as an essential part of securitynot as a minor detail.
Securely delete specific files with Eraser
One of the classic programs for Windows is Erasera free tool that allows destroy files, folders and free space by overwriting the sectors where the data resided multiple times. Their 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 higher), 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 menuSimply right-click on the file or folder, choose the "Eraser" option, and then "Erase".
The system will ask you for confirmation, reminding you that the removal will be permanentUpon accepting, Eraser will add the operation to its task queue and begin overwriting the corresponding disk area. The default method is usually the scheme Gutmann of 35 passes, extremely thorough, although somewhat slow with large files.
If you open the Eraser interface, you can perform more advanced uses: create scheduled tasks, choose different algorithms (for example, single-pass methods with pseudo-random data or standards such as British HMG IS5), clear recycle bin and unused spaceor adjust the frequency so that cleaning runs automatically.
On mechanical hard drives, a few passes with random data are more than enough to prevent the practical recovery of the filesThe 35-pass methods are reserved for very demanding cases or contexts where extremely sensitive information is handled, assuming that 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 file destruction. It's important to distinguish between logically remove (Trash, shortcuts, Explorer) and royal overwriting Of 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. While the Recycle Bin is still open, you can use "Undo Delete" or restore the file to its original location. At this point there is no effective erasure.
When you empty the Recycle Bin, Windows marks that space as available, but as we already know, the content remains recoverable until the system overwrites it with new data. The same thing happens if you delete directly using keyboard shortcuts, such as the Shift + Delete combination, 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 It bypasses the Recycle Bin but does not perform a secure eraseIt simply performs a more direct logical erase.
For more powerful operations, you can use the command prompt or PowerShell. The command del /FC:\path\file From the command prompt, it forces the 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 It allows the deletion of entire files and directories, while still leaving them vulnerable to recovery as long as they are not physically rewritten.
Use of file destruction tools: SDelete and similar
To go a step further and ensure that the data is truly crushed, there are specific utilities such as SDelete (Secure Delete), part of the Microsoft SysInternals package. This command-line program is intended for overwrite the physical location where the file resided or to clean the free space of the unit.
Once you've downloaded SDelete and extracted the ZIP file, you'll find the executable sdelete.exe. From a command prompt window with appropriate permissions, you can use commands like sdelete filename to delete a specific file, or add parameters such as -s -q to act on folders recursively and silently.
When you want to ensure that all the free disk space is cleaned up, you can launch sdelete -zThis command is responsible for writing data to the areas marked as free, so that the remnants of previously deleted files are destroyedIt is very useful after manually deleting large amounts of information that you don't want to be recoverable.
SDelete also offers the possibility of controlling the number of passes that apply to a location. Using, for example, sdelete.exe -p 5 file You can overwrite the area where the file was located five times. The more times you overwrite, the harder it will be to recover, although the process will also take longer.
It is important to keep in mind that the effect of SDelete is definitive and irreversibleIt should not be used lightly, and you should always have backups of any data you want to keep, because once overwritten there will be 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 clean disks safely. Programs such as DBAN (Darik's Boot and Nuke) They are loaded from a CD or USB and allow delete all contents of one or more drives applying different erasure algorithms (DoD 5220.22-M, Gutmann, PRNG, etc.), proving very useful when you want to leave a piece of equipment ready for recycling or handover.
Other utilities, such as CCleaner or certain system optimizers, include modules for delete free space and temporary filesThis also improves system performance by removing bloatware and unnecessary programs. Solutions like Avast Cleanup, for example, combine cleaning up digital junk files with suspending resource-intensive applications.
In the corporate sphere, there are encryption and data management tools such as Atlansys Bastion Pro (distributed with some security products) which, in addition to encrypting drives and directories, offer functions of guaranteed cryptographic erasureThrough the Explorer's context menu, it is possible to select files or folders and order them to be securely deleted, showing a detailed progress and allowing you to stop the process, although without the possibility of recovering what has already been destroyed.
The choice between them will depend on whether you want delete loose 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 does not, in itself, imply the permanent destruction of the data, you can use certain functions to overwrite the free spaceA little-known resource is the Windows encryption commands with specific modifiers, which allow writing to all areas marked as free on a specific drive.
The typical flow consists of delete the files manually first (and empty the Recycle Bin so that Windows marks that space as available) and then launch 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 that operate on a drive-by-drive basis, specifying the corresponding drive letter. The process can take quite a while on large drives or drives with a lot of free space, but when it finishes 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 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 will result in a truly permanent deletionIn general, a quick format only reorganizes the logical structure of the file system, but It does not rewrite all the contentso that 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 option to “clean the unit” (in the advanced settings section), the system performs a much more thorough deletion process, aimed at the data cannot be easily recovered.
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 do this beforehand. make backups of everything you need to keep on another medium.
In the case of modern SSDs, many manufacturers incorporate a "secure erase" option into their management tools, which sends a specific command to the drive to reset all memory cells to a state similar to factory settings. Along with full disk encryption, it's one of the most recommended ways to wipe 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 the Recycle Bin overflowing 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 so that, periodically, Automatically empty the Recycle Bin and delete temporary files.
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 downside: when a file disappears through this method, You will no longer be able to recover previous versions or documents deleted by mistake.unless you have external backups. That's why it's recommended to combine this feature with a data protection policy. backup of important data.
At the same time, it reduces the residual information footprint in the system, making it harder for malware or an attacker to find it. remnants of documents you thought no longer existedIt's not a "military" wipe, but it is a good step towards keeping digital clutter under control.
Full disk encryption and key destruction: the elegant way
A very effective strategy, especially with SSDs and modern equipment, is encrypt the entire disk from the beginningIn this way, even if someone manages to get hold of the physical drive, they will not be able to read anything without the decryption key, because the stored data is completely encrypted.
In Windows you can use tools like BitLocker, on macOS FileVaultand in Linux to solutions like VeraCrypt or LUKS. Ideally, this encryption should be enabled. right after installing the operating systemBefore 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 disk, Change the encryption password to a long, random one. that you can't remember and delete all the records where you stored it. In practice, that's equivalent to destroying a chest key: the data is still there, but They are impossible to interpret without the key.
In the specific case of SSDs, combining full encryption with this key destruction is one of the few truly simple and safe ways to ensure that the content is 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 deletion is not considered sufficient, and the option chosen is physical methods of destroying the supportThis is where mechanical, thermal, and chemical solutions come into play.
On a mechanical level, although the image of the hammer and nail is tempting, does not guarantee that the data is unrecoverableThere are specific industrial shredders 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 reading.
In the thermal field, units based on ferromagnetic coatings can be subjected to temperatures above their Curie pointIn the case of chromium oxides used in some discs, the temperature 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 is effectively cancelled that it contained.
Finally, there is the chemical route: very aggressive mixtures like the classic aqua regia (1 part nitric acid to 3 parts concentrated hydrochloric acid) are capable of completely dissolve the metallic components from a hard drive, erasing both the data and the storage medium itself.
These procedures, although radical, have obvious drawbacks: They are dangerous, expensive, and require suitable facilities (protections, ventilation, specific equipment). These 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 the decision is made to reuse computers instead of destroying them, it is essential that a thorough inspection be carried out beforehand. complete rewriting of 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 deleted; 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. a simple "get out of the way" and truly safe disposal of your data.
Table of Contents
- What really happens when you delete a file in Windows or macOS?
- Differences between HDD and SSD when deleting data
- Why deleting files unsafely is a real risk
- Securely delete specific files with Eraser
- Six ways to delete files in Windows (from simplest to most advanced)
- Use of file destruction tools: SDelete and similar
- Additional software for secure erasure and optimization
- Deleting free space with PowerShell and Windows commands
- Formatting, PC reset, and complete system wipe
- Automate the cleaning of temporary files and the Recycle Bin in Windows
- Full disk encryption and key destruction: the elegant way
- Physical destruction: when you can't afford any risks

