Why does deleted data stay on a HDD once written, waiting to be overwritten, as opposed to being removed when requesting deletion?

400 views

Why does deleted data stay on a HDD once written, waiting to be overwritten, as opposed to being removed when requesting deletion?

In: 22

30 Answers

Anonymous 0 Comments

Unless there’s a security reason to need to wipe the data so none of it can be found, it’s a lot faster to not bother and instead just mark those parts of the disk as being freely available to overwrite with something else rather than being overwritten right now.

It’s like “who cares that these bytes aren’t all zero? You’re not using them anyway.” Later, when you do start using them, you’ll be replacing them with your new content anyway so you gain nothing by writing to them twice (once to blank them out and again to write something new.)

Imagine a wall with a mural.

You mark off a rectangular spot on the wall – a part of the mural you don’t mind clobbering with a new picture. You paint over it with white to blank it out, and then plan to let someone else paint a new picture on it later.

Well, instead of painting it over with white, you could have just marked the rectangle off with a border, and then not bothered to paint it over with white yet – just mark it as available. Let the person who’s going to paint something new there paint over it – don’t bother with the in-between step of painting it blank in the mean time. **This is essentially what disk drives do when you “erase” a file**. They just mark the space as “clobber-able” without actually bothering to clobber it yet, leaving that to happen later when some file needs the space and writes over the top of it.

It takes extra time to write over the top twice – once to blank it and once again later when putting something new there.

That being said, there are some secure filesystems that DO blank it when you erase, for use in places where the extra time is worth it for security.

You are viewing 1 out of 30 answers, click here to view all answers.