Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed 12.04 alongside Windows 7. Now I am happy with 12.04 that it works better for me. I really want to remove Windows 7 from my HDD and left 12.04 to work with me, and got free HDD space back to 12.04.

Is there an easy way to remove Windows 7 out and keep 12.04 without problem?

share|improve this question

I would do the following to remove said partition:

  1. Boot a live CD.

  2. Select "Try Ubuntu"

  3. Open Gparted(Search for it)

  4. Make sure your hard disk is selected in the dropdown in the upper right.

  5. Right-click the Windows partition and format it to NTFS.

  6. Right click your old Windows partition and click Resize/Move. Resize it to an arbitrarily-small size, at least 64MB.

  7. Right-click your Ubuntu partition and click Resize/Move

  8. Drag the arrows on the left or right as far as possible to make the partition bigger.

  9. Click Resize to accept the dialog.

  10. Click apply in the toolbar above. The icon is a green check.

  11. Acknowledge the warning. Allow the operation to complete, and then open a terminal.

  12. Type: mkdir /mnt/sda2 && sudo mount -t ext4 /dev/sda2 /bin/bash, assuming sda2 is our Ubuntu partition.

  13. Run sudo grub-install /dev/sda and then sudo update-grub.

Please note that if Ubuntu is in an extended partition, you should right-click and resize the extended partition first.

share|improve this answer
If you slide it to the left, and the partition of which the size is increased is the root partition, you'll be left with an unbootable system (it'll be shifting, not resizing). I don't know why, but when I removed openSUSE and extended the Ubuntu root partition, I couldn't boot into Ubuntu either. And I DID complete the partitioning process. – Akshit Baunthiyal Aug 15 '12 at 12:19
@AkshitBaunthiyal Thanks for the heads-up. I have found a workaround. – hexafraction Aug 15 '12 at 12:34
Did you update grub? – To Do Aug 15 '12 at 12:34
@ToDo It just isn't my day today. Thanks for the reminder. – hexafraction Aug 15 '12 at 12:40
@ObsessiveFOSS - What is it?? – Akshit Baunthiyal Aug 15 '12 at 15:36

Of course. Just format the drive in which Windows was installed and run the following command - sudo update-grub

You're done. :D

share|improve this answer
This leaves a partition in the way. – hexafraction Aug 15 '12 at 12:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.