Technology in terms you understand. Sign up for my weekly newsletter, "Confident Computing", for more solutions you can use to make your life easier. Click here.

How do I reformat and reinstall Windows? (XP & Vista)

//
In many of your answers you talk about “reformat and reinstalling Windows”. What is that? How do I do that, exactly?

(Click here for a newer version of this article covering Windows 10.)

“Reformat and reinstall” is the computer’s equivalent of erasing the chalkboard and starting over.

And I do want to emphasize the “erasing” part.

It’s conceptually very easy, but also somewhat time consuming.

And if not done with the proper preparation, you could lose absolutely everything on your computer.

Become a Patron of Ask Leo! and go ad-free!

Reformatting and reinstalling is pretty much exactly what it sounds like:

  • Reformatting is the process of initializing a hard disk to an empty state. This step deletes everything on your hard drive. Everything.
  • Reinstalling is the process of copying Windows back on to your hard drive and reconfiguring it to your needs. It also encompasses the fact that you’ll also need to reinstall all the application software you use, as well as restoring all the data you might want to continue to have available.

If you have an existing computer that you’re about to reformat and reinstall, there’s a very important first step:

Back Up

I don’t care how – be it an image backup of the entire machine (my preference), or a careful backup of all the files and any other data that you want to keep – but you must do this before you begin. The process we’re about to embark on will erase everything from your hard drive.

You’ll also need all the installation media for everything you plan to install, including your original Windows installation disk and its product key.

There are two basic approaches:

  • Reformat or erase the disk, and then run Windows setup
  • Just run Windows Setup, and let it reformat the disk

I’ll spend most of my time on the second option, since it’s all that most people need.

The first option gets complicated since you can’t reformat or completely erase a hard disk that’s in use – i.e. if you’ve booted from it. If you want to take this two-step approach then my tool of choice to erase a hard disk that’s been in use is DBAN. Boot from that, erase the disk, and then boot from your Windows installation media to reinstall Windows from scratch.

As it turns out, the Windows setup program can be used to erase or format the hard disk as well; it’s just not obvious where in the setup process you can do so. We’ll examine it both for Windows Vista, and Windows XP, since they’re quite different.

Window Vista

Step one is to simply boot from the Windows installation DVD and eventually the Windows Vista Setup program will begin:

Windows Vista Setup initial screen

You’ll then walk through a series of configuration pages:

  • choose language and keyboard
  • Install Now
  • enter the product key
  • accept the EULA

You’ll finally come to this page:

Windows Vista Setup - Custom Installation Choice

Regardless of whether or not “Upgrade” is available to you, choose Custom.

After a few minutes of examining your system, Windows Vista Setup will then display this page:

Windows Vista Setup - Where to install

This is where you tell Windows Setup on which drive you want Windows installed. Note that the list of drives on your system will likely be different than seen here.

Click on Drive options (advanced):

Windows Vista Setup - Where to install - with advanced options

Note that several additional options are now visible.

First: Make sure to click on the drive or partition you want to erase and on which you want to install windows.

Second: click on Format.

Windows Vista Setup - Format warning

Heed the warning: “If you format this partition, all data stored on it will be permanently deleted.”

Press OK, and Windows Setup will format the hard disk partition that you’ve selected.

After the format is done, you’re returned to the drive selection page, where you can click on Next to continue the installation.

Windows Vista Setup - Installing

Window XP

Step one is to simply boot from the Windows installation CD and eventually the Windows XP Setup program will begin:

Windows XP Setup Welcome screen

After accepting the EULA you’ll be presented with a list of prior Windows installations:

Windows XP Setup destination selection

We want to install a fresh copy of Windows XP, so press the Escape key (ESC).

The next screen shows us the available drives and partitions:

Windows XP Setup drive/partition selection

In order to force a reformat, we’re going to delete the destination partition and recreate it.

Click on the drive that you want to install to, and press “D“:

Windows XP Setup partition removal confirmation

Press Enter to confirm that you want to delete the partition. Since this is a destructive operation (all information on the partition will be erased), Windows XP Setup asks again, just to be sure:

Windows XP Setup partition removal second confirmation

Press “L” to delete the partition.

Now you’ve got an unpartitioned hard disk. Windows XP Setup now presents you with the list of drives and partitions again:

Windows XP Setup partition creation

Select the unpartitioned space, and type “C” to create a partition. You’ll then be asked to enter the size of the new partition:

Windows XP Setup partition sizing

The default value should be the maximum appropriate for that partition, so simply press ENTER to continue.

Setup returns you to the partition selection screen:

Windows XP Setup partition selection

This time what was the unpartitioned space is now “Partition1 [New (Raw)]”. Select that and press ENTER.

Windows XP Setup notices that your destination partition is not formatted:

Windows XP Setup format selection

The default is to format using NTFS, which is just fine for more situations. Press ENTER to let the format begin.

Once the formatting is complete, Windows Setup then automatically begins copying files to the newly formatted partition and continues with additional options and selections related to how you would like your new installation to be configured.

20 comments on “How do I reformat and reinstall Windows? (XP & Vista)”

  1. It needs to be said that if your computer has a virus, then likely any backups you have will have them too, and after you do all the hard work of getting rid of everything and reinstalling everything, you will *still* have the virus.

    You want to make absolutely sure that your backups are clean of all viruses, trojans, keyloggers, spyware, and anything else you can think of *before* you start this arduous process.

  2. When this is completed how do you get all the updates needed? There must be hundreds and is there a specfic order to install them?

    Make sure you’re behind a router or some other kind of firewall, connect to the internet, and simply visit Windows Update, repeatedly, taking all the updates offered each time until it says you’re up to date.

    Leo
    20-Oct-2009

  3. Great job with the screenshots Leo. Answering TommyZ’s question: After the Windows version is reinstalled, XP SP2 or higher will prompt you to start downloading updates and they come down in the order that is needed–sometimes immediately prompting for XP SP3 for example. And don’t forget the hardware drivers! Some folks use a driver backup tool before reformatting, but on Dell PCs the process is much easier, either through the Driver CD included with the PC or by downloading drivers by inputting the Dell Service Tag at support.dell.com. Hope that helps!
    Ralph

  4. If you need your key prior to doing the above, all you have to do is download and run Belarc Advisor, and it gives you all of your licenses and all programs, updates, etc. But if you have more than one OS on a disc (as I do), then you need to run it on both partitions.

  5. i never formatting laptop before and these articles really helpful. but it seems formatting the XP version is quite complicated..

  6. Dear Leo,
    I am having a PC Intel 3.00 GHz, 1 MB RAM, 40 GB + 120 GB harddisks, 512 MB Nivida AGP Card. Whenevr I install Windows XP SP2 (Genuine) I do have any problems. But when I update it automaticlaly to Windows XP SP3 and Internet explorer 8, my PC goes very slow. What could be wrong? Should I have to keep XP SP2 as it is or should I have to update it every often through automatic update option including with critical security updates?

  7. Dear Leo,

    I have been trying to install Windows Vista on my Intel 3.00 GHz, 1 MB RAM PC, but I was getting an error while installing it. Is my PC compatible for the said installation. Why that does not work on Pentium IV PC while other OS works?

    Can’t help without knowing the error message.

    Leo
    24-Oct-2009

  8. Yes, great info, but how, how, how do you reformat Windows 95????

    It’s been years since I’ve had to, but it’s the same basic process as XP, only using the Windows 95 installation media.

    Leo
    28-Oct-2009

  9. I always find great help everytime I open this site.
    Yes this is the right way that I have been using to Format and Install Windows

  10. Hi, Leo.

    Any idea why I cannot select F8 to accept the End User License Agreement in step two above for Windows XP? My computer allows the page scroll buttons and the ESC button to work, but not F8 for some reason. Thanks!

  11. leo, I am do not know alot about computers I have a problem with my desktop and im not sure how to go about fixing it… It wont let me past the sign in screen I think my computer may have crashed but im not sure what to do from there …. I have a windows xp disk but I dont know how to run it or anything can you help me out?

  12. I was infected by the trojan generic downloader.z and about 5 others during a Mcafee update last week (no browser open), and it took us all day Saturday to reformat and reinstall Windows XP from disc. It would not boot from disc, but did after we pressed the F12 key. I updated gradually to service pack 3, but had no sound. I’m no expert and just learn as I go along, so it took me 2 days to figure out what I needed to do. Yes, it is easy to “download drivers by inputting the Dell Service Tag at support.dell.com”, but it helps if you first look at what you need to download by looking in the device manager. It was also important in my case to download and install the ‘Intel Chipset Software Installation Utility’ FIRST before downloading any drivers. I only found this out by lots of google searching, and reading the tech help forums, as I think Dell will only tell you this, if you pay for their tech. support. I now have MalwareBytes and have to figure out what other security I need as I don’t trust McAfee any more.

  13. Before reading this (section for reinstalling XP), I completed the steps up to pressing “L” to delete the largest partition in my hard-drive. After that I DID NOT partition again, but instead pressed ENTER to set up Windows on that now unpartitioned space. I did a format using the NTFS file system… the formatting proceeded and once it hit 100%, the message came up that “Windows could not complete the format”…After that I had to get out of the setup. I saw that two partitions were created in the hard drive during the formatting attempt… I tried again, but then a message came up that “Windows Set-up cannot find hard drive”, hard drive can be damaged, check connection to computer etc..
    now I don’t know what to do… help.

  14. Thanks Leo. I have a question though. On the computer I want to reformat and reinstall XP, the disc drive doesn’t work. Can I copy the installation CDs onto an external drive and follow the above instructions from there? Can I boot from the external drive? And I assume that the drive’s installation files would be deleted from the main hard drive… but I’m not sure what effect this would have.
    Thanks for your help!

    Unfortunately That typically won’t work – just copying the CD to an external drive doesn’t make it bootable. My honest recommendation is that you replace the CD ROM drive, or get an inexpensive USB CD-ROM drive to boot from.

    Leo
    16-Jan-2011

  15. Thank you Leo
    (1) for the helpful answer (2) for constantly reminding us to back up our data in SOME way
    I wanted to share a bit about my experience in case it helps someone else, and ask a question…

    On April 1st, for some reason (virus?), I was not able to boot Windows XP after a restart–I would get my DELL screen, then my computer would hang on a black screen with just a blinking cursor on the top left. My only options were to hit F2 or F12 before the blank screen, so I eventually decided to re-install Windows using my Dell XP Reinstallation CD. I couldn’t even get a DOS prompt, so to avoid getting stuck on the blank screen, I changed the boot sequence to boot from the CD first. From there, I was able to follow the directions in your article.

    Question: When I got to the part where I had to delete the drive, I had four items to choose from, and wasn’t sure if I should delete all of them. In your article, it says, “Click on the drive that you want to install to and press ‘D’.” What if there is more than one available drive or partition? How do I know which one to delete? I think I saw drives C, E, and F, (one said “[FAT 32]”). I figured I had nothing to lose, so I reluctantly deleted all of them except for the unpartitioned space. From my description, can you tell me why I had those additional partitions that are not on your screen shots? Was it a bad idea to delete them all, or is that what I was supposed to do?

    Fortunately, my computer is running again. The bad news is that I wiped out everything–it was strange to see the ADD/REMOVE programs empty!–but since I had made copies of my personal files, it was actually nice to have a fresh start for my old computer and to be able to add only the programs I wanted.

    Anyway, thanks to your constant reminders, I did not permanently lose my files, emails, and projects, and I was able to bring my computer back to life by myself! I read through several solutions online, but it was your explanation and screen shots that made the most sense to me and made me feel comfortable that I was on the right track. Thanks again!

  16. Dear Leo i do not understand Partition is this a seperate part of the disk which will contain the O.S is it really needed ?
    Thank you for your excellent article , You are the best Regards Burt

    A single physical hard disk can hold one or more partitions which then look like separate disk drives to Windows. You need at least one, but whether you need more depends on you and how you want to configure and use your machine.

    Leo
    13-Jan-2012
  17. Leo,
    I’ve reformatted numerous times with XP. This week my brother wanted me to upgrade some stuff on his newly acquired (but used) xp machine and I requested the CD to reformat it. He came back to say that another well known computer tech guy (that I highly respect) had said that reformatting wasn’t really good because he’d gotten many, many machines that “wanna be” computer techs had reformatted only to cause huge problems on the machine. I don’t know of ever having caused any problems with the ones I’ve done and I’ve never heard of reformatting being so terribly complicated that most people completely screw it up. Is there really a significant danger of having messed up a system if it appears correct after a reformat/reinstall?? Are there hidden, not so obvious, things that get messed??
    Please advise… Thanks!

  18. For some reason my PC crashed: stating it has lost windows rootsystem32hal.dll. file. I have the windows XP recovery CD, but cant get it to run. Is there a way to recover those files? If not how to I go about erasing the hard drive and reinstalling windows XP? Theres no data on the hard drive I care about.:)

Leave a reply:

Before commenting please:

  • Read the article. Comments indicating you've not read the article will be removed.
  • Comment on the article. New question? Start with search, at the top of the page. Off-topic comments will be removed.
  • No personal information. Email addresses, phone numbers and such will be removed.
  • Add to the discussion. Comments that do not — typically off-topic or content-free comments — will be removed.

All comments containing links will be moderated before publication. Anything that looks the least bit like spam will be removed.

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