Helping people with computers... one answer at a time.

Creating a large file and then deleting it overwrites anything on your computer's free space: but that's still not enough to protect yourself when giving away a computer.

There's much discussion on how to insure personal data cannot be recovered when a PC is sold or scrapped. We know that a standard file delete will not really delete the disk data, but just de-allocate the sectors making them available for use when other files are created or extended. Would a simple solution be to use a file shredder tool or simply to use a script to create a large junk file, which would fill all available space thereby overwriting the data from old deleted files?

In this excerpt from Answercast #37, I look at how to protect your data when you give away a computer.

Overwriting files

In a sense, yes.

In many ways, that's pretty much what a file shredding tool does or what a secure delete tool does.

  • All they really do is they overwrite the space that's available with random data.

Well, that's essentially what creating a large file would do:

  • If you just filled that file with random data,

  • Filled your entire hard disk (in other words, used up all of the free space on the hard disk for this file),

  • And then deleted it.

  • You would have overwritten all of the free space on the disk.

It's not enough

Now, I am going to say that's not enough. It's not enough because there is more to your system than just what's in its free space. You're talking here about when a PC is sold or scrapped.

So what you really need to do is you need to delete everything; even the files that are there. You don't know:

  • What's stored in the registry.

  • What's stored in the swap files.

  • What's stored in other files that Windows maintains that you might not want to have other people able to get access to.

That's why I so strongly recommend that before you give a computer away or even just recycle or scrap a hard disk, that if you can (if the hard disk is still working), you run a utility like DBan on it:

Erases everything!

That securely and completely erases everything on the hard disk whether it's in use or not.

The net result, after running DBan, is a completely empty hard disk. And that's exactly what you want to give away. You don't want to give away any of your data whether it was left over in free space or actually still in use by the system.

Article C5612 - July 21, 2012 « »

Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

Joe F.
July 24, 2012 9:31 AM

I've heard that DBAN is outdated, and not as effective as other programs such as Secure Erase. Have you heard about that?

July 24, 2012 6:56 PM

If you're replacing that computer with a newer model, see if the oldster's hard drive is compatable with the newbie. If it is, keep it for a backup or extra space.

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to to ask your question.