Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

What's the best way to clear my hard drive of everything but the operating system?


What’s the best way to clear my hard drive of everything but the operating
system? In this case, Windows XP, SP3.

In this excerpt from
Answercast #34
, I look at the difficulties involved in trying to erase
everything on a hard drive except the operating system. Our old standby,
reformat and reinstall, will do the trick.


The operating system

Unfortunately, there is no way to clear your machine of everything except the operating system.

The problem is that programs that have been installed over time kind-of blur the line of where the operating system begins and ends. Windows is pretty poorly designed in that sense. There are many things that make it difficult to understand exactly what is and is not part of the operating system.

  • A good example is Internet Explorer.

We don’t think of Internet Explorer as being part of the operating system. We think of it as being a standalone application in its own right. Yet, many components of Internet Explorer are actually used by Windows itself.

Reformat and reinstall

So, since there is no way to do exactly what you’re asking for, the only solution I can offer is to do the traditional:

  • Reformat your machine completely (in other words, erase everything including the operating system);

  • And then reinstall the operating system from scratch.

That’s really the only way to insure that the only thing on your machine is the operating system.

Securely erase the drive

If you’re concerned about files possibly being recovered, you might consider using DBAN: Darik’s Boot and Nuke. That is used to securely erase the entire hard disk, eliminating all traces of any files that might have been there.

  • Do that before you install Windows again from scratch.

Your only option

Unfortunately, as I said, there really isn’t a way to do exactly what you’re asking for. The only way is to erase everything and reinstall the OS from scratch.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

5 comments on “What's the best way to clear my hard drive of everything but the operating system?”

  1. this was great. i`ve been wanting to do a clean re-install. now tell me how to do it on a second hand PC that did not come with a CD.

  2. @Glen – Sometimes you can request and receive an OS copy from the manufacturer, but if that is not possible I would borrow a CD from another machine (one you have or friend’s or colleague’s etc.) with the same version OS and reactivate with the code on your machine.

  3. What about using a tool like ccleaner to delete the empty space on your drive? Say you have a pc you wanted to donate, you remove any 3rd party software using add/remove or Programs/Features and then running the ccleaner wipe on unused hard drive sectors overwriting deleted data. Granted, I’d rather format and reinstall but for someone not comfortable with that, is there any reason you would not use this technique?

  4. If you think that you may need to clear your hard drive back to the OS on a more regular basis, you might want to take an image of your hard drive after you reformat and reinstall and set your Windows settings. Then you can just use the system image.


Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.