When you delete a file, the data itself stays on the disk untouched — the operating system only removes the pointer to it, which is why forensic tools can recover files months after they seem to have vanished

When you delete a file, the data itself stays on the disk untouched — the operating system only removes the pointer to it, which is why forensic tools can recover files months after they seem to have vanished

Empty the Recycle Bin, watch the icon vanish, and the file appears to be gone. It is not. On the physical platter or flash chip, the bytes that made up the document, photo or spreadsheet are still sitting where they were a second earlier. What actually changed is much smaller and much stranger: the operating system rewrote a tiny entry in a table of contents, marking the space as available. The data itself is untouched, and it will stay that way until something else happens to land on top of it.

That gap between what deletion looks like and what it actually is has kept an entire industry of forensic examiners in business for decades, and it explains why photos from a formatted memory card can reappear months later, why journalists have accidentally shipped laptops full of recoverable source material, and why intelligence agencies write their own standards for making a file truly disappear.

The filesystem is a library catalogue, not the books

To understand why deletion is so shallow, it helps to picture a filesystem the way it is actually built. On a Windows machine formatted with NTFS, every file has an entry in the Master File Table, a structured index that records the file’s name, its size, its timestamps, and — crucially — the list of clusters on the disk where its contents live. On macOS with APFS, or on Linux with ext4, the arrangement differs in the details but the principle is identical: there is a catalogue, and there are the shelves.

When a file is deleted, the operating system almost never walks along the shelves erasing the books. That would be slow, and on flash storage it would wear the memory cells out faster. Instead, it edits the catalogue. Microsoft’s own documentation of NTFS describes how file records are simply marked as no longer in use; the clusters they occupied are added back to the pool of free space. The bytes on those clusters remain exactly as they were until the operating system decides to reuse that space for something new.

This is why the Recycle Bin is faintly misleading. Even after emptying it, all that has changed is a flag. The original content is still addressable, if you have a tool that can read the raw disk rather than going through the filesystem’s polite front door.

How recovery tools find the leftovers

Forensic software takes advantage of the gap in two ways. The first is to read the filesystem’s metadata directly and look for records that have been marked deleted but not overwritten. If the MFT entry still lists which clusters held the file, and those clusters have not been reallocated, the file can be reassembled cluster for cluster in seconds. Tools like The Sleuth Kit, used widely in law-enforcement labs, are essentially very careful readers of these half-erased catalogues.

The second technique is called file carving, and it does not need the catalogue at all. Most file formats begin with a distinctive signature — a JPEG starts with the bytes FF D8 FF, a PDF with %PDF, a ZIP with PK. A carver scans the raw disk from beginning to end, looks for those signatures, and tries to reconstruct the file from whatever contiguous data follows. This is how photos vanish from a camera card and then reappear intact weeks later, even though the filesystem has no memory of them. The open-source utility PhotoRec has been recovering images this way since 2002.

Neither technique is exotic. Both are taught in undergraduate digital forensics courses, and both work on a surprising fraction of second-hand drives. A frequently cited study by Simson Garfinkel and Abhi Shelat, which examined 158 used hard drives bought on the open market, found only a handful had been properly wiped. The rest still held recoverable emails, medical records, and in one case a year of transaction records from an ATM.

Why the data eventually does disappear

The reprieve is not permanent. Every time the operating system needs to write something new, it draws from the pool of free clusters, and if it happens to pick clusters that used to belong to a deleted file, the original bytes are overwritten. Busy drives churn through this space quickly; a nearly full drive that sees constant use can render most deleted files unrecoverable within days. A drive that has been sitting almost empty since the deletion may still hold everything, months or years later.

This is why the honest answer to “can this file be recovered?” is always “it depends on what has happened to the disk since.” The more writing that has occurred, the less that survives.

SSDs changed the picture — but not the way people think

Solid-state drives complicate the story in an interesting direction. Flash memory cannot simply overwrite a cell the way a magnetic platter can; it has to erase a whole block first, which is slow. To keep performance up, modern SSDs use a command called TRIM. When the operating system deletes a file, it tells the drive which blocks are no longer needed, and the drive’s controller can quietly erase them in the background so they are ready for the next write.

On an SSD with TRIM enabled — which is the default on every modern Windows, macOS and Linux system — deleted data often really does become unrecoverable within minutes, not because the filesystem has changed its behaviour but because the drive itself has been given permission to scrub the cells. This is one of the few places where solid-state storage is genuinely worse for forensic recovery than the spinning disks it replaced. It is also why old advice about running “undelete” utilities frequently fails on newer laptops.

External SSDs, USB sticks and SD cards are a different matter. Many of them do not support TRIM at all, especially when connected over USB, so deleted files on a camera card behave much more like files on a traditional hard drive: still there, still carvable, still waiting.

Making a file actually go away

Because deletion is so cosmetic, anyone genuinely trying to destroy data has to do extra work. For spinning drives, that historically meant overwriting the file’s clusters with random bytes — sometimes multiple times, following standards like the U.S. Department of Defense’s old 5220.22-M specification. More recent guidance from the U.S. National Institute of Standards and Technology, in Special Publication 800-88, concludes that a single pass is enough on modern drives; multiple passes are a habit inherited from older, lower-density media.

For SSDs, overwriting is unreliable because the drive’s wear-levelling algorithms may quietly redirect the writes elsewhere. The recommended approach is to use the drive’s built-in secure-erase command, or full-disk encryption from day one — if the whole drive is encrypted, destroying the key destroys access to the data, no matter which cells still hold ciphertext.

A useful thing to know

The gap between deleting and destroying is one of those small facts that reshape a lot of everyday intuitions. It is why selling a laptop without wiping it is not the same as clearing the desktop. It is why the “deleted” folder on a work computer is a poor place to keep secrets. It is also, in a quieter way, one of the many places where the interface a computer shows its user is a simplified fiction on top of something much messier — a bit like how a phone does not really know how much battery it has left, or how a browser address bar hides a long chain of DNS lookups behind a single Enter key.

The catalogue is not the library. Once that distinction clicks, the recycle bin looks a little different.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Make Tech Easier Editorial Team Avatar

Read next

Noise-cancelling headphones don’t block sound, they generate its exact mirror image — a microphone samples the incoming wave, and the driver plays an inverted copy that meets it and cancels to near silence
The Apollo guidance computer that landed astronauts on the Moon ran on 64 kilobytes of memory, and its programs were literally woven by hand — women at Raytheon threaded copper wire through tiny magnetic cores, one bit at a time
Your phone does not actually know how much battery it has left; a fuel-gauge chip estimates the percentage from current, voltage, temperature, and a model of the cell, with a late correction sometimes turning 15 percent into 3 percent in less than a minute
When you type an address into a browser, your computer first asks a DNS resolver for the site’s IP — a query that may bounce through your router, your ISP, and one of just 13 root server clusters before the page ever begins to load
Voyager 1 is still transmitting from more than 25 billion kilometres away, powered by less than 250 watts of decaying plutonium — a signal that now takes over 23 hours to reach Earth, carried by a radio no stronger than a refrigerator lightbulb
In September 1947, engineers at Harvard pulled a moth from a relay inside the Mark II computer, taped it into the logbook, and wrote ‘first actual case of bug being found’ — the pest was literal
When Sony shipped the first Walkman in 1979, chairman Akio Morita insisted on a second headphone jack and a “hotline” talk button, convinced it would be rude for one person to listen to music alone — and within a few years buyers had ignored the sociable features so completely that Sony quietly dropped them
Russia still custom-builds the Soyuz return seats for ISS crew members using plaster casts taken weeks before launch, because astronauts grow as much as five centimetres taller during a long-duration stay and a seat moulded to their Earth-shaped spine would no longer fit the body that comes home