Can anyone tell me how to delete Ubuntu from a Linux / Windows dual boot system without harming Windows?

I ran sudo fdisk /dev/sda in a linux terminal and got the following output:

  • /dev/sda1 - system
  • /dev/sda2 - Compaq diagnostics
  • /dev/sda3 - HPFS/NTFS/exFAT
  • /dev/sda5 - W95 Ext'd (LBA)
  • /dev/sda6 - Linux
  • /dev/sda7 - Linux swap / solaris

From my online searches, I know how to delete any of these partitions but what I don't know is if I should delete any of the other non-linux labeled partitions to complete the process.

  • 4
    Do it from Windows - the disk manager will display what's in use and what not.
    – Mat
    Jun 2, 2012 at 10:56
  • 3
    Be careful, you first have to restore the Windows boot loader!!!
    – jippie
    Jun 2, 2012 at 11:00
  • About the Windows boot loader, is there anything I can do if I don't have a Winddows CD/DVD ?
    – sisko
    Jun 2, 2012 at 12:36
  • 1
    I wanted to flag the question for migration, but somehow it became a "vote to close". I think the solution is probably to "do it from Windows", and that suits SU better.
    – phunehehe
    Jun 3, 2012 at 11:02

2 Answers 2


When in doubt, leave it alone. To remove Linux, delete the partitions sda6 (Linux) and sda7 (Linux swap). Do not touch the others. While you're at it, make sure that the Windows partition (sda3) is marked as bootable.

This will not give any space back to Windows. If you want Windows to expand, you'll have to do it with Windows tools.

If your system is currently configured with dual boot, it's probably using a Linux bootloader. If you remove Linux, your system will become unbootable. You can try restoring the Windows boot sector by installing the mbr package and running install-mbr:

install-mbr /dev/sda

I don't guarantee that this will work. Your best bet is really to use a Windows installation CD.


This is actually quite easy. Go to Start > Computer

Click on the internal hard drive. In my one, it is C drive.

In this folder, you will see some other folders. Especially windows and Ubuntu.

From this folder delete Ubuntu. This will delete or remove Ubuntu from your computer.

The if you want to connect that free space to your windows, follow these steps.

Start > type in disk management > create and format hard disk partitions > wait to load > on the bottom panel under "disk 0" find internal hard drive(C: on my one as before) > right click on internal hard drive > Extend volume... > choose how much > default is all free space > okay.

  • 2
    This is true only assuming that it's a WUBI install.
    – gronostaj
    Aug 31, 2013 at 6:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .