Satirical comic blog

The link has been copied to the clipboard.

A deleted file... still exists?

Published on 24 November 2025 by Gee

So obviously, this is going to be a popularization article where most of my usual readers won't learn much, but if it helps to clarify things...

A deleted file… still exists?

Let's take a look at this very common scene:

A man and a woman are watching TV from their sofa. On the TV, we hear: “We have the suspect's hard drive, but he's deleted all the data!” “No problem, we'll ask the little computer genius on the 6th floor to recover the data for us, he knows how to do it!”

⚠️ Of course, since depictions of computer science in fiction are often crap... mediocre, to put it politely, you can legitimately suspect that this is a scriptwriting device similar to infinite zooms:

Two cops behind a PC. The first one says, “Johnson, enlarge that tiny area of the image and ENHANCE it for me.”  The second one says, “But boss, there are like 20 black pixels here, I don't see what... OH MY GOD, there was an HD image hidden in there!” The first one says, “And there was the signed confession in those 20 pixels! Well done, Johnson, we've got them!”

In the case of deleted files, the question arises:

💡 Is it possible to recover deleted data, and if so, by what miracle (given that it is supposed to have been deleted, precisely)?

Gee explains: “First, let's rule out the case where the files have just been ‘put in the recycle bin’. The recycle bin is just a special folder where your files are placed while you decide whether you really want to delete them. Nothing is deleted until you empty it.” A diagram shows that putting a file in the recycle bin is equivalent to moving it to a folder, and restoring it is equivalent to moving it back the other way.

That being said, let's now talk about a file that is really deleted, once the recycle bin has been emptied.

▶️ We often have a misconception about how a file is stored: we tend to imagine that the medium (hard drive, SD card, etc.) is a blank page that we fill or erase.

A blank page labeled “new unused media”; a pen leads to a filled page labeled “media after writing a file”; an eraser leads to a blank page again labeled “media after deleting the file”.

⚠️ Except that's not really how it works. A medium will contain a certain number of bits that can be zero or one: there is no “blank” or “unused” state. Your digital medium is never a blank page, but rather a long series of switches that can be open or closed:

Illustration of the series of open or closed switches.

▶️ When you store a file, nothing is actually “written”: you have to imagine that these switches are then arranged to accurately represent the file's content, a bit like when you enter a code by turning the wheels on a combination lock.

Gee shows a combination lock: “Here, I haven't actually ‘written’ the number 1337, I just arranged the wheels so that it would appear. Well, on a hard drive, it's the same thing: writing a file is just arranging numbers that are already physically there no matter what.” The smiley face: “Now you know the code for Gee's suitcase, which was incredibly hard to find.”

💡 So how do we know that a location on the disk is occupied by a file and not by a meaningless string of bits? Well, the file system keeps track of where each file is located and how much space it takes up, in a kind of small address book.

We see a long series of zeros and ones, with one pointer that says “Placebo – Mars Landing Party.mp3” and another that says “IMG_19890310_154500.jpg.” Between the two, there is nothing.

💡 So what happens when you delete a file? Well, you simply delete the reference to that file in the address book.

The same image as before, but without the JPG file. The content of the file is still there!

▶️ That's why the file can still be recovered with the right tools: even though it is no longer referenced by the system, its content is still on the disk!

Gee, behind his computer, sweating but smiling, says: “This is something that saved me half a day's work when I accidentally deleted a script while developing my video game 'Superfluous Returnz'*!”

A slightly more technical story than this comic, which I told on the game's blog.

⚠️ Obviously, since the area previously occupied by the file is now considered free by the system, it will potentially be used to store something else in the future, and the content is likely to be overwritten —and therefore truly deleted— soon.

Still using the image of the file system with zeros and ones, another file, “the_meteor_system_final_2_really_final.pdf,” has been written in the middle of the freed space. Some parts of the old file are still recoverable, but most of it is definitely lost.

⚠️ Conversely, the fact that files are not actually deleted can be a real security issue!

A guy in an office says, “I threw away the external hard drive where we stored customer bank details; it was too old.” A colleague replies, “Did you format the drive first?” “ The guy says, ”Yeah, of course, I'm not stupid.“ Outside, a malicious guy rummages through the trash, thinking, ”Hehehe, I'm going to recover everything..."

An ordinary guy, panicking, says: “Damn, so the person I sold my old hard drive to on eBay can recover my sexta... my vacation video?” The Geek Girl replies: “In theory, yes.” The guy: “Ah. Drat. Darn. Holy f#ck."

💡 Obviously, you have to gauge your level of paranoia based on the use case and the threat level.

Selling your hard drive on eBay: a guy says, “Cool, this hard drive is half price!” Most people will buy your hard drive to use it, not to spy on you. Throwing away bank details: same scenario as before with the guy rummaging through the trash, the risk is high, and if you don't encrypt your data, you're being irresponsible*.

An encrypted hard drive requires a secret key to be read: so even if you recover the bytes written, without the key, you won't be able to do anything with them.

So you might ask me:

But why doesn't the system actually delete the file?

By filling the memory space with zeros, for example?

Gee explains: “Well, first of all, it takes time: imagine deleting a multi-gigabyte HD movie, that's a lot of space to fill with zeros. Look at how long it takes to copy a large file: it would be the same.” The computer robot replies: “Are you willing to wait several minutes for the file to be deleted, or would you rather it take a millisecond?”

Gee explains: “And it prevents your media from aging prematurely: every write operation contributes to wearing it out, so it's best to avoid writing stuff when it's not necessary.” The robot in a deck chair: “Exactly. That's why I'm doing f#ck all. I'm preserving myself.”

💡 Note that if you really want to physically erase the content of a file, there are utilities designed for that purpose: on Gnunux, for example, it's the shred command.

Gee: “Go ahead, shred the hell out of that file!” The robot: “I'm replacing the space occupied with only zeros, then only ones, then the same thing 5 times, then with a random sequence of zeros and ones*.”

Forensic techniques could be used to recover data that has been overwritten just once on certain media, so you can never be too careful.

Personally, if I had to pass on a personal digital medium to someone, I'd make sure to run the shred command on the entire medium involved.

The robot is not happy: “Uh, this is gonna take a while, right?” Gee, lying in the deck chair: “Go ahead, I have all the time in the world.”

⚠️ But the worst part is that even that wouldn't completely guarantee erasure: in fact, some sectors that have become invalid on a hard drive may never be rewritten...

Gee with a mask and a flamethrower: “I get it. Let's go for drastic remedies, then.” The robot is scared.

In conclusion, what we call “deleting a file” can have many meanings, and it's important to understand what we're talking about:

A file is first placed in the recycle bin (where it can be restored); then it is deleted (where it can be recovered if not yet overwritten); then it is physically erased by a utility or overwritten by another file (and restoration is impossible or partially possible); the media is physically destroyed (it's over). Note: Comic strip licensed under CC BY SA (grisebouille.net), drawn on November 5, 2025 by Gee.

Published on 24 November 2025 by Gee
Did you know?

Comic strips that tackle a variety of topics —science, language, history, anecdotes— with humor while attempting to provide some educational added value: popular science, cultural or social analysis, etc.

100% human drawings, guaranteed AI-free, made with love

This blog uses no generative AI; the scenarios are not written by a computer program; the drawings are entirely hand-drawn on a graphic tablet by a human author-draftsman.

Support

This blog is published under a free license and may be freely copied, shared, modified, and reused. It is free of charge because it is primarily funded by your donations. You can support me very easily without registering: