How to delete files securely
- Turn on full-disk encryption, ideally before you store anything private.
- Use the right method for the situation, from the guide below.
- Reset or erase the whole device before it leaves your hands.
Deleting does not erase
When you delete a file, the operating system marks its space as free. It does not wipe the contents. The data stays on the drive until new data happens to be written over it, which can be days or never. Free recovery tools often bring such files back.
Formatting a drive has a similar limit. A quick format rebuilds the file index but leaves most of the data in place.
Why overwriting is unreliable on SSDs
On an old spinning hard disk, writing new data over a file's location replaces the old data. That is why overwrite tools were once recommended.
Solid-state drives, USB sticks and phones use flash memory with wear levelling. To spread wear, the drive's controller decides where a write physically lands, and it often puts the new data in a different place from the old data. So a program that overwrites a file may never touch the cells that held the original. The drive also keeps spare areas that the operating system cannot see.
The standard guidance from NIST (Special Publication 800-88, Guidelines for Media Sanitization) is that overwriting alone is not enough for flash storage. It recommends methods built into the drive, such as a secure-erase command, or cryptographic erase.
What TRIM does and does not do
TRIM is a command the operating system sends to an SSD to say that certain blocks are no longer used. The drive can then clear them in the background. It helps keep the drive fast, and it means deleted data is often cleared soon.
But TRIM is not a security feature. When the drive clears the blocks is up to the drive, and you get no confirmation. Do not rely on it to erase something sensitive.
Full-disk encryption is the real answer
If everything on a drive has always been encrypted, then erasing the key makes all of the data unreadable at once. This is called cryptographic erase, and it works the same on SSDs and hard disks. It is also protection while the device is in use: a lost or stolen laptop reveals nothing.
On Windows, use BitLocker (available on Pro and higher editions) or Device encryption, which some Home PCs have. On a Mac, turn on FileVault in System Settings, under Privacy and Security. Android and iPhone encrypt storage by default when a screen lock is set, so always set one.
Encryption is only as strong as the password or PIN, so use a long one. Keep the recovery key somewhere other than the same device. Official guides: BitLocker overview at learn.microsoft.com/windows/security/operating-system-security/data-protection/bitlocker, and FileVault at support.apple.com/guide/mac-help/protect-data-on-your-mac-with-filevault-mh11785/mac.
Wiping free space on Windows with cipher /w
Windows includes a command that overwrites the free space on a volume. Open Command Prompt and type: cipher /w:C:\ . The letter is the drive. Microsoft describes /w as removing data from available unused disk space on the entire volume. It does not touch files that still exist, so delete what you want gone first.
It can take a long time on a large drive. And because of wear levelling, it is a weaker guarantee on an SSD than on a hard disk. Treat it as a useful extra for old data on a drive that was not encrypted, not as proof that nothing remains. Reference: learn.microsoft.com/windows-server/administration/windows-commands/cipher.
Before you sell, give away or recycle a device
Windows: back up what you need, sign out of your accounts, then use Settings, System, Recovery, Reset this PC, and choose Remove everything. Choose the option to clean the drive if it is offered. If the drive was encrypted with BitLocker, the reset also makes the old data unreadable.
Mac: sign out of iCloud, then use Erase All Content and Settings in System Settings under General, Transfer or Reset. On Intel Macs older than 2018 without that option, use macOS Recovery and Disk Utility to erase the disk. See support.apple.com/guide/mac-help/erase-your-mac-mh27903/mac.
Phones: sign out of your accounts, switch off any lock tied to your account, and use the factory reset. This is safe because the storage is encrypted, and the reset throws away the key.
A drive that held very sensitive data and will not be reused is best physically destroyed. For ordinary people, encryption plus a proper reset is enough.
What this website can do
Our File Encryption and Password Protected ZIP tools lock files, and our Hash Generator can show that a file has not changed. None of them erases anything from your device, because a website cannot reach into your drive. If you want to hide a file for good, encrypt your whole drive, then erase the key when you no longer need the data.
About this guide
Pressing Delete rarely removes the data. This guide explains what happens to deleted files, why overwriting is unreliable on modern drives, and the simple steps that do work: turn on full-disk encryption early, and reset the device properly before you sell or give it away.
Common questions
Is emptying the Recycle Bin enough?
No. It frees the space, but the data stays until something overwrites it, and recovery programs can often get it back.
Can I trust a file shredder on an SSD?
Not fully. An SSD may store a write in a different place from the old data, so overwriting the file does not reliably overwrite the old copy.