‘Uninstalling’ Ubuntu

Prateek asked me today on how to ‘unistall’ his Ubuntu installation, since he’s quite fed-up of Ubuntu 8.04 too (with all its frequent crashes and app hangs). As I’ve said earlier too, it’s a shame that Canonical pushed out Ubuntu 8.04 without proper work just to meet their silly 6-month release cycle.Coming back to the topic. He has a dual-boot system with Windows XP and Ubuntu installed, and he would like to reclaim the space that is being hogged by Ubuntu right now (many others might have been in the same predicament). So I thought of putting this tutorial together for him and others.

‘Uninstalling’ Ubuntu isn’t really the same as simply removing the partition on which Ubuntu resides. If you do that, what will happen is that the next time you boot up GRUB (the bootloader which Ubuntu installs) will fail to start the chainloader for Windows. To prevent this what you need to do first is to rewrite the Master Boot Record (MBR). One of the ways to do this is to use a Windows install CD, but I won’t talk about that method because a) most people don’t have a Windows install CD handy b) there’s an easier way out. Note that the following procedure is for existing Windows users who are dual-booting. There are two ways to get started with removing Ubuntu. Before we begin, make sure that you don’t choose the ‘Hibernate’ option while rebooting you PC (if needed) for any of the following instructions. Nada for enabling hard disk encryption too – disable thta before doing any of this stuff.

Please continue at your own risk. I can’t be held responsible for any data loss which happens. It’s wise to make a backup, if possible. The software probably won’t be faulty, but what if you have a power-cut or app hang during the editing process (the results would be disatrous)? That said, the procedures are generally considered safe – if you don’t screw it up by doing something wrongly.

If you’re using Windows Vista

  1. EasyBCD interface
    EasyBCD interface

    You need to get this useful little utility called EasyBCD by NeoSmart Technologies. It’s freeware and a tiny little download. Needs the .NET framework, but that should be there by default on a Windows Vista system.

  2. Install the application, and then start it up.
  3. Click on the Manage Bootloader button.
  4. Select the option Reinstall Vista bootloader (it’s selected by default anyway).
  5. Then click on the Write MBR button. That’s it! Just takes a few seconds to write and won’t give much of a notification either.
  6. Go to Control Panel. The easiest way to find the thing you need now is to search for ‘format disk’ – you’ll get the requisite option. Start that administrative utility.
  7. Vista Disk Management Utility
    Vista Disk Management Utility

    The Disk Management utility starts up. Your Ubuntu partition(s) would be shown here as ‘unrecognized’ – at least two of them, one for Ubuntu and one for Linux swap. Right-click on them (one-by-one) and choose Delete volume. Windows will (surprisingly) inform you that although it can’t read the partition, some other operating system might be using it. Choose to continue anyway (because that’s what you want).

  8. You aren’t done yet. After deleting the Linux related partition(s), click on the green-colored area which is show and choose Delete partition. Now that area will be show as Unallocated space.
  9. Right click on your current partition (the one you want to expand) and choose Extend volume. The wizard will help you extend it; by default all the unallocated space will be included for extending and all you need to do is click next. The whole extending process shouldn’t take more than 1-2 minutes at max.

If you’re using Windows XP

  1. Things will be a bit ‘tougher’ for you. First, you need to download MBRFix from this place. Note that you should download it directly to C:.
  2. Start the Command Prompt – either by going to Start > Programs > Accessories > Comman Prompt; or by going to Start > Run > type cmd.exe and press Enter. A window will open. I’m NOT going to say ‘press Enter’ after each statement from now on, it’s implied. I’ll just give the commands you need.
  3. Type cd \
  4. Type MbrFix /drive 0 fixmbr /yes
  5. That should do the trick. Reboot and check once whether it worked. Now you need to remove the Ubuntu partition.
  6. Paritions
    Creative Commons License photo credit: James Morrison
    If you have the Ubuntu Live CD, then use that to boot into Ubuntu.

    1. Go to Applications > Accessories > Terminal. Enter
      sudo swapoff -a

      Close the terminal window.

    2. Click on System > Administration > Partition Editor. Delete the Ubuntu partitions by right-clicking on them, and then choosing the delete required option.
    3. Then right-click on your Windows partition, and choose the resize option. Increase the partition to the size you want. Note that this will only work if you have free space AFTER the Windows partition. Click on the Apply button to commit the changes. Note – If you have a FAT32 Windows partition then you must use either the Ubuntu Live CD, or simply download a Live CD of just the Gparted partition editor from here (not too big a download, so it’s a lesser headache than getting a huse ISO). For the latter, make sure that you choose the Stable Gparted Live option.
  7. If you don’t have Ubuntu Live CD, and have an NTFS filesystem for Windows, then get Partition Logic (again, a free software) from here. Burn the ISO file to a CD (make sure you choose the ‘burn image’ option on your CD burner app, and not ‘create data disc’), pop it into the CD tray, and reboot. A live CD session will start up, with an interface somewhat similar to the Gparted partition editor. Click on the partitions you wan’t to delete and click the Delete button. After that is done, click on your Windows partition and choose Resize. Resize it as you wish.

Hopefully, the procedure should go smoothly and you’ll be able to reclaim a lot of valuable disk space. Many people install Ubuntu just to try out Linux, and then forget about it – only to remember when they’re running out of disk space and feel the pinch. It’s important to reiterate here – do NOT simply remove the Ubuntu partition, remove the bootloader first. Pray to the mighty penguin lords that Ubuntu 8.10 will be better.

0 replies on “‘Uninstalling’ Ubuntu”

@Ankur – Thanks a lot for making that post. Will refer to it soon. I am eagerly awaiting the next release of Ubuntu.

My question is: How do I uninstall Ubuntu without a dual boot?
I want to install Win XP. I check the bios to boot to cd first then the hdd.
I placed the XP cd in and restarted the computer. It did not boot to the cd like it should, it went straight to the unbuntu login screen.
Help please.

Does your BIOS provide a choice to choose bootup device while starting up (not just from configuration)? If yes, then try to select CD drive from that. Or maybe you didn’t burn the XP CD as a bootable disc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.