Bob Morris: Investing, tech, coffee.

How to uninstall Ubuntu on dual boot Windows XP using Windows only

February 9, 2008 · 95 Comments

My dual boot Ubuntu installation on Windows XP got hopelessly trashed. Endless command line errors upon booting. After much searching, I found an easy way to uninstall it using Windows only.

It took me about three minutes and it worked flawlessly. Hope this helps someone else. (And now I can reinstall Ubuntu!)

Quick instructions: (detailed instruction follow)

A.) Use Disk Manager in Windows to delete the Ubuntu partitions.

B.) Boot off your Windows XP CD.

  1. Choose “Repair”
  2. When it asks for the installation number, I put in “1″, and it worked fine (you may want to test this first to be sure.)
  3. Enter Admin password.
  4. At the command prompt type “fixmbr”, then confirm. Windows will overwrite the dual boot info in the MBR that Ubuntu put there.
  5. Reboot!

Full details:

Uninstall Ubuntu using Windows
https://answers.launchpad.net/ubuntu…+question/1800

Suppose you are running Windows. If so, follow these steps:
1) In Windows, launch Disk manager and remove every partition used by Ubuntu (root partition, swap, …)
2) Reboot with your Windows CD. When asked, choose “repair” and launch fixmbr. This command replaces GRUB with Windows bootloader.
3) Reboot again and you have done.

Once you are done, it you want to recover the space for Windows that was once used by Ubuntu. You can use the steps outlined above (going the the Disk Manager, etc). To create a new NTFS partition and assign it as something like the D: drive (or some other letter) to be used for data and so forth.

How to use Disk Manager
http://support.microsoft.com/kb/309000

To start Disk Management:
1. Log on as administrator or as a member of the Administrators group.
2. Click Start, click Run, type compmgmt.msc, and then click OK.
3. In the console tree, click Disk Management. The Disk Management window appears. Your disks and volumes appear in a graphical view and list view. To customize how you view your disks and volumes in the upper and lower panes of the window, point to Top or Bottom on the View menu, and then click the view that you want to use.

NOTE: Microsoft recommends that you create a full back up of your disk contents before you make any changes to your disks or volumes.

Categories: Ubuntu · computer tips
Tagged:

95 responses so far ↓

  • Politics in the Zeros » Uninstall Ubuntu on dual boot XP using Windows only // February 9, 2008 at 8:12 pm | Reply

    [...] My tech blog has full details. [...]

  • Pages tagged "ubuntu" // February 10, 2008 at 1:52 pm | Reply

    [...] bookmarks tagged ubuntu How to uninstall Ubuntu on dual boot Windows XP us… saved by 1 others     rocker4lyfe646 bookmarked on 02/10/08 | [...]

  • Josep // February 17, 2008 at 5:14 am | Reply

    Hello,
    dear Bob Morris, I have tried to install Ubuntu 7.10 in my 8Gb USB to allow a dual boot but I was unable to enable the write options on USB….so ubuntu was fast but I could not update Ubuntu OS…
    Dual Boot worked very well, but only if I had the USB connected… My goal was to boot on my USB in any computer, I must try again.
    Nevertheless, I wanted to uninstall dual Boot XP-Ubuntu and your page has allowed it in only 2 minutes !!!
    And, the most important thing, my windows XP (with everything inside from my work) keeps running very well without any data lost !!
    Again, thank you for your web page !

  • Bob Morris // February 17, 2008 at 10:48 pm | Reply

    Wa-hoo! Glad I helped!

  • john9210 // March 28, 2008 at 12:29 pm | Reply

    I tried uninstalling ubuntu on my XP computer. I deleted the partitions with no problem, but after I rebooted I get the following messages during boot:
    Grub loading stage 1.5
    Grub loading please wait
    Error 17

    The startup hangs at this point. When I reboot this happens again (either with or without the Win XP boot disk).

  • Bob Morris // March 28, 2008 at 9:44 pm | Reply

    This might be because the grub loader from Ubuntu is still in the boot sector. Deleting the partitions won’t get rid of the grub loader.

    Did you boot off a Windows XP CD and do fixmbr as mentioned above? That should fix the problem.

  • Jeremy // April 11, 2008 at 7:09 pm | Reply

    I’m having the same Grub problem but don’t have a true WinXP install disc. The disc that came with my toshiba uses Symantic’s ghost program to put the windows image on. No repair options. Any suggestions?

  • Bob Morris // April 12, 2008 at 12:15 pm | Reply

    Find a friend who has an XP install disk and boot off that, should work.

  • Raj Mishra // June 8, 2008 at 9:34 pm | Reply

    Hi,
    You had deleted the password, but may be you forget to change the computer’s startup, i.e. boot-up sequence. Change boot option first boot from CD & then boot from HDD.
    When you delete the partition it just remove Ubuntu not bootloader. If the first boot device is HDD then boot-loader will try to use load. As Ubuntu is not there it will give that problem. Try to use boot from CD option and then use “FixMBr”

  • Raj Mishra // June 8, 2008 at 9:36 pm | Reply

    sorry in my above post instead of “Uninstalled Ubuntu” I had write “deleted the password”.

    Please note that first line after hi read as “You had uninstalled Ubuntu, but”

  • rass // June 30, 2008 at 12:21 pm | Reply

    how du u uninstalled Ubuntu

  • ibbe // July 11, 2008 at 1:35 am | Reply

    Hi,
    I have Ubuntu in my pc. I wish to remove Ubuntu and to install winxp.
    Please some one can help me?
    Ibbe

  • Robert // July 12, 2008 at 8:53 am | Reply

    I just uninstalled Ubuntu using your walk through it was the best walk through that I have found yet for uninstalling Ubuntu. KUDOOS!!

  • Bob Morris // July 12, 2008 at 1:33 pm | Reply

    Thanks! This is just my little tech blog, but this post consistently gets anywhere from 20-100 hits a day. Glad it’s helped people.

  • Rahim Niaz // July 22, 2008 at 8:38 am | Reply

    Thanks a lot. The best way to get rid of Ubuntu. I appreciate your hard work.

  • Jono // July 26, 2008 at 7:48 pm | Reply

    Solved problem completely! Thanks for your work. Cheers!

  • Zaid // July 27, 2008 at 10:32 pm | Reply

    Thanks for the tip, I have tried it with Vista and it worked like a charm.

  • Zaid // July 28, 2008 at 1:13 am | Reply

    To clarify: Bootrec /fixmbr.

    Thanks again!!

  • Lisa // August 3, 2008 at 2:53 pm | Reply

    Thank you so much!
    I had a broken linux mint partition, and an unwanted mandriva partition, and this was of great help. I used an ubuntu live CD to edit the partitions to how i wanted them, then followed the steps to repair windows, and it works perfectly now. Excellent simple walkthrough!

  • geesorry // August 8, 2008 at 7:04 am | Reply

    why would anyone want to uninstall ubuntu ? its far superior in every way compared to windows but thats just my uneducated opinion !

  • Bob Morris // August 9, 2008 at 12:01 am | Reply

    I had no choice. The Ubuntu installation was hosed and wouldn’t boot.

  • abhi // August 28, 2008 at 3:40 am | Reply

    hii i uninstalled it but at the time of start up it shows the option for selecting the operating system..why how to stop that

  • Bob Morris // August 28, 2008 at 10:36 pm | Reply

    Did you do fixmbr too? If that isn’t done, the option to select os will remain, even if the os is no longer there.

  • Angem0m // September 2, 2008 at 7:17 am | Reply

    hello
    i tried your solution with fixmbr
    it worked, i rebooted in windows xp, and when i selected another restart the same problem…
    grub loading stage 1.5….
    grup loading, please wait……
    error 17
    i please give me an advice

  • Bob Morris // September 2, 2008 at 11:43 am | Reply

    Grub is looking for Ubuntu which is no longer there, sounds like. Are you sure you did the fixmbr? That will overwrite the grub booter.

  • Angem0m // September 3, 2008 at 1:43 pm | Reply

    yes i’ve done the fixmbr
    right now i don’t have any more problems . i just gave it another restart and it worked .
    i hope i won’t have any more problems .

  • Alastair Ingram // September 9, 2008 at 11:36 pm | Reply

    My Windows XP is on HDD: C and Ubuntu is on HDD: F at the command prompt it tells me HDD: C is #1, what number is HDD: F? Thanks!

  • Bob Morris // September 10, 2008 at 9:59 pm | Reply

    Disk Manager or a similar utility should be able to tell you what number F: is.

  • John from Aus // September 18, 2008 at 1:01 am | Reply

    Thanks alot …… I unistalled ubuntu 8 using partiton software and got caught with the error 17 message…..thanks to your post flawless removal… Thanks Again

  • Rand // September 23, 2008 at 2:48 pm | Reply

    Thanks for the info.

    I forgot the root password for Ubuntu so I cannot login to root. This severely limits what I can do on the system. I’m a former Unix system administrator so there are a lot of things I would like to be able to do with a Linux system — and I can’t — Aargh!

    Fortunately, I have not done anything critical on the Ubuntu system — yet!

    Now I know how to do an uninstall of Ubuntu using my Windows dual-boot installation. Ubuntu won’t uninstall itself without that root password. Then I can re-install Ubuntu with a new root password and start having some fun.

  • balaji // September 24, 2008 at 12:39 am | Reply

    when i put my win xp cd, its not asking for any installation number, what can i do?
    i have installed windows in C drive and ubuntu in E drive (only a part of the drive is used by ubuntu, remaining is in ntfs file system). i have certain other datas in E drive(ie. in ntfs other than ubuntu’s file system) will it be damaged?
    tell me a safe way to remove ubuntu without damaging the files in E drive.
    with regards,
    balaji

  • Bob Morris // September 24, 2008 at 1:05 pm | Reply

    Rand: Glad I could help. Ubuntu doesn’t really let you get to root. Certain commands require a root password and you can do them, but you never really get free access to root. This was to insure that newbs didn’t bonk the system., I think,

  • Bob Morris // September 24, 2008 at 1:08 pm | Reply

    Balaji: Hmmm, not sure. Can you back up the data first. AFAIK, Ubuntu creates its own partition so the deinstall only frees that space.

    If it doesn’t ask for an installation number, maybe you don’t need one.

    Have you look at the disk with disk manager?

  • balaji // September 26, 2008 at 3:56 am | Reply

    hi morris!
    ya i have seen the disk with disk manager but its not showing the linux partition, it shows as such the whole drive(E drive in my case) is in ntfs format.
    i backed up my data.
    tel me what to do next? should i format that particular drive to remove ubuntu from my system? and then to follow your instruction to overwrite the mbr?

  • Bob Morris // September 26, 2008 at 2:00 pm | Reply

    I can’t see how it could remove Ubuntu if DM doesn’t show the partition.

    But yes, if you just need to overwrite the mbr, then what I said should work. Maybe you don’t even need to format.

    (So, try removing mbr, with or without a format, but I can’t guarantee anything…)

  • Pang // October 3, 2008 at 1:08 pm | Reply

    Hi morrris, i did fixmbr like what you posted, but the choice of os screen still appear when i try to restart my com, i don’t know what happen, what did i do wrongly??
    can you detailed the steps?? i type fixmbr, then type y, then type exit to reboot com, right??
    any file that i need to delete from my hard drive?

  • Bob Morris // October 4, 2008 at 12:14 am | Reply

    Hmmm. Did you boot off the Windows CD and is the installation number correct? That’s about all I can think of. Hope it helps. Yes, you have the sequence of the steps correct.

    There aren’t any files that needed to be deleted.

  • Pang // October 4, 2008 at 10:44 am | Reply

    ya, i have boot off the windows cd, and only one installation number is available, that’s 1, it directs me to c:/windows, then till there i follow what you said, yet it still prompt me to select os when i start my com.

  • santosh // October 6, 2008 at 5:31 am | Reply

    hi
    i have dual booting on my laptop useing ubuntu and xp professional i wnat to uninstall ubuntu pls kindly replay me thank

  • Travis // October 25, 2008 at 3:58 am | Reply

    HooooOO! Finally! I got an answer,it worked. I’ve been searchin’ and finding solution for like a week now..

  • Bob Morris // October 25, 2008 at 11:02 pm | Reply

    I took me a long time to find the answer too, so when I did, I posted it here.

    And it gets a steady 100-125 hits a day.

    I’m happy it helped.

  • Rubi // November 8, 2008 at 12:23 am | Reply

    I installed Ubuntu but I don’t like it. I want my Windows Vista back so bad! I can’t get it back!! Can someone please help me, I don’t know what to do!

  • Bob Morris // November 8, 2008 at 9:58 pm | Reply

    Just do what it says here. It works with Vista too.

  • John Vivian // November 13, 2008 at 3:32 am | Reply

    Your instructions worked perfectly and also introduced me to the mysteries of MS Disk Manager. Many thanks for allowing me to claw back 50% of my hard disk. John Vivian

  • wael // November 19, 2008 at 3:13 pm | Reply

    this was really good
    simple, clear, straight foreword, and efficient.
    I was wondering around trying to find a way to uninstall ubuntu
    I just followed your way and it worked very nicely

    thank you a million.

  • Arnold // November 21, 2008 at 4:38 am | Reply

    How about if I just reformat the HDD where Ubuntu was installed?

    Will it remove everything?

    I plan to just reformat my HDD and then reinstall Windows.

  • Bob Morris // November 22, 2008 at 11:17 am | Reply

    I’m not sure if formatting the HD gets rid of the Ubuntu stub in the MBR or not.

  • shashank Purohit // November 26, 2008 at 1:27 am | Reply

    Thank you very much……For Finding simple instructions.
    i have xp and ubuntu (with xp installed first)
    my ubuntu root file system have too many space…… so i move some files from my documents in xp to ubuntu home/documents folder…..after restarting computer it doesn’t boot from xp….i did not understand the problem….i boot pc from ubuntu and read your post….and
    1.)move the files to its previous place….
    2.)uninstalled ubuntu
    3.)restarted pc……but there was still showing error….tried to repair from xp bootcd….used chkdsk command ….gives “one or more files on the partition are corrupted”
    after that booted from live cd of ubuntu and just deleted moved files……and problem solved.
    hope if any one have this type of problem this will help them.

  • shashank Purohit // November 26, 2008 at 1:33 am | Reply

    i have minor problem…..the swap space used by ubuntu is of 667 MB.and i can’t delete this partition.it shows”this contains MBR data”….now what to do any method for moving mbr to any other location…..if you know reply me at spurohit21@gmail.com
    Again thanx.

  • Bob Morris // November 26, 2008 at 4:42 pm | Reply

    You can’t move the mbr. It’s in sector 0 of the hard disk. You can only remove it in Windows as described in B) above.

  • Nickocosmic // November 30, 2008 at 11:47 pm | Reply

    Assuming i do this and it deletes the partitions and all, how can i resize the ntfs partition that windows xp is on? i’m rather tired of dealing with partitions and want just one partition on which to run windows and keep my data.

  • vinod // December 14, 2008 at 3:14 am | Reply

    nice job!!
    thanks a lot..

  • vinod // December 14, 2008 at 3:17 am | Reply

    friend i have a doubt that, is it possible to install ubuntu or any other linux os in external hard drive..???
    if possible can u tell me the sequence of steps to do that????

  • Bob Morris // December 14, 2008 at 9:57 pm | Reply

    No idea… Sorry,

  • sithutun25 // December 30, 2008 at 3:58 am | Reply

    hello!I can’t create new partition.How should I do?

    Can I use partition magic to merge to my system ?

    Pls reply me.

  • Najim // January 9, 2009 at 2:48 am | Reply

    Tanx alot dude… i was all fckd up losing 17gb of disk space. got it done using disk management. thanx again.

  • Jens // January 14, 2009 at 2:01 am | Reply

    Hey,
    great guide! I’m soon gonna try it for myself since I have simular problems like you do with ubuntu right now.

    One question though, it feels like it would be safer to do step B first, the fixmbr part, and then step A, deleting the ubuntu partition, to make sure it works before you delete any data.

    Is this possible? Thanks!
    // Jens.

  • Danijel H. // January 21, 2009 at 3:57 am | Reply

    Works like a charm!

    Thank you.

  • Carolyn R // January 29, 2009 at 8:21 pm | Reply

    How do you remove ubuntu from xp computer that has no cd drive. Everyplace says to boot from xp cd

  • i just want to say... // January 31, 2009 at 3:13 am | Reply

    you my good friend are my hero of the week
    i fudged up my linux mint dual boot and i was trying to figure out the easiest, most efficient way to remove it without creating a major headache for myself, THANK YOU for your help, you saved me so much time and effort
    :D

  • simbad // February 15, 2009 at 1:58 am | Reply

    Hi Bob, many thanks worked great not even a minute and i was done.

    Cheers :)

  • Phantombumi // February 22, 2009 at 3:34 pm | Reply

    thanks, i,m saved :D

    btw can i copy your tutorial to my blog …

  • Angel // February 26, 2009 at 4:43 pm | Reply

    Thank you, Bob.

    We must be annoying with all our “help” signals and the avalanches of “thanks”. The fact is you deserve all the avalanches. As a real recurer.

  • chesterqw // March 12, 2009 at 7:21 am | Reply

    awesome… it was fun playing with ubuntu but i need the space back.

  • Dante Torio // March 13, 2009 at 8:09 am | Reply

    Hi bob,
    Thanks for the post. I am new to Linux and I have a related problem. I have a dual boot XP and Mandriva computer (Dell Latitude d630). I unstalled Mandriva (using repair and fixmbr) to replace it with Ubuntu. I got rid off the Mandriva but it left some on my hardisk several directories with ext3 formats (6 to be exact) in D:/ which is a extended Primary partition. How can I get rid of these directories and configure to install Ubuntu (still in dual-boot mode).

    Thanks for any help!

    dante

  • kalwa // March 21, 2009 at 1:17 am | Reply

    hi bob

    how can i uninstall ubuntu on multiple boot windowsxp, windows 2003 server using windows??
    do i follow same procedure as u mentined in dual boot and using windows xp cd for repair?

    with regard
    Kalwa

  • Prasun // April 17, 2009 at 2:45 am | Reply

    I have ubuntu installed already in my desktop. When I insert the windows bootable cd and press enter, it says checking hardware configuration. After that it is completely blank screen and nothing comes up. Help!

  • How to uninstall ubuntu on dual xp boot use window | HENDII's blog // April 21, 2009 at 10:22 am | Reply

    [...] : here This entry was posted on Apr 22nd, 2009 at 12:22 am and is filed under Uncategorized.You can [...]

  • Ruth // April 26, 2009 at 5:49 pm | Reply

    Tutorial looks great, but there’s one thing different–I’m on a netbook. Any suggestions for someone who doesn’t have a CD drive? I could try borrowing an install disk and external drive, I suppose. :-/ No worries if you don’t have an answer, but if you have any suggestions, that’d be awesome.

  • Chiron // May 3, 2009 at 7:48 am | Reply

    Many thanks. Even I could understand your instructions – very straightforward.
    I’m 83 – too old to swim but I can still paddle.

  • mark // May 8, 2009 at 2:43 pm | Reply

    Hi im newbie(understatement) anyway i did fixmbr then used bootcfg to delete ubuntu. I went to cmd prompt in windows typed bootcfg/? which gives instructions on how to delete boot file for unbuntu then i was fine

  • Ben // May 18, 2009 at 10:45 am | Reply

    by the way i forgot to tell u, i dont seem to be able to find fixmbr. as im no expert on the subject , i may need rather detailed instructions!!

  • Bob Morris // May 18, 2009 at 9:04 pm | Reply

    You need to boot off the XP install disk. When you boot, Repair will be an option.

    To boot off a CD, you might need to change the settings in the BIOS for the boot sequence.

  • Bimal // May 20, 2009 at 7:57 pm | Reply

    heyllo ppl , i installed ubuntu on the same partition as Windows XP..! After un-installing Ubuntu , the option Ubuntu still appears in start up.!
    What am i supposed to do about it ??

  • Bob Morris // May 20, 2009 at 10:23 pm | Reply

    You also have to do fixmbr, uninstalling Ubuntu is just part of the process

  • Cozmo // May 25, 2009 at 12:38 am | Reply

    I Have XP on a Primary Drive.
    Nothing Else On The Disc.
    Ubuntu Is On A Partition On A Secondary Drive.
    Ubuntu installed Over My MP3 Partition and My Backup Info.
    How Do I Uninstall Ubuntu Without Deleting My MP3 and Backup Info. ?

  • Bob Morris // May 26, 2009 at 10:43 pm | Reply

    IF you installed Ubuntu over the MP3 / Backup info, then that data is gone…

  • Tom // May 28, 2009 at 1:12 pm | Reply

    Wow. This really worked well. -Thanks

  • Entel // June 7, 2009 at 1:08 pm | Reply

    Hi Bob,
    I have a singular problem.
    I accidentally installed Ubuntu 9.04 twice onto my computer. My hard drive is currently divided into 6 partions:
    Windows Vista
    2 x Ubuntu
    2 x Linux swap
    I would like to get rid of one of the Ubuntu and one of the Linux swap partitions safely.
    I know how to delete the partitions but I understand that I also need to edit the GRUB, which I have no idea how to do.
    Can you help me with this please?
    Thanks,
    Entel

  • narayan // June 8, 2009 at 5:26 pm | Reply

    I have xp and ubuntu. I want to delete ubuntu. R u sure that nothing will happen if i have windows C.d.

  • taiko // June 10, 2009 at 4:40 am | Reply

    uninstall dual boot win xp & ubuntu
    no need to insert cd
    u just check at win xp msconfig
    then check at sub system
    edit (remove text “ubuntu”)
    save and restart ur pc
    and dual boot will be clear

  • David Venters // July 1, 2009 at 3:01 am | Reply

    Bob, I simply followed your advice at the very top of your blog. Did not even read everyone else’s comments. It worked PERFECTLY!
    Thanks :)

  • Yasir Imran // July 7, 2009 at 11:23 pm | Reply

    If I have windows vista ,solution will be same or something else

    I have vista and ubuntu togeter, if fixmbr will work for me?

  • idris // July 8, 2009 at 6:09 am | Reply

    hello sir,
    iI want to uninstall my ubuntu 8.0. so i am using win xp. so i need explain about how to boot off window xp CD and i dont know about fixmbr…what it is…please explain mae……

  • idris // July 8, 2009 at 6:17 am | Reply

    hi
    how to create bootable USB drive….

Leave a Comment