Super User is a question and answer site for computer enthusiasts and power users. 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

So I've been running Ubuntu alongside Windows 7 for a year or so.

Is there a way to remove Windows 7 from my system without having to reinstall Ubuntu from scratch so I can use all the disk space?

Or would it be faster just to reinstall Ubuntu?

share|improve this question

migrated from Nov 23 '11 at 11:16

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

Off topic, but anyway:

The simplest way is to

  • get rid of the windows installation (just reformat the related partition)

  • run sudo update-grub

Done. Alternatively, you could hand edit the grub config (/etc/grub.d/*) but I don't recommend it.

Edit You COULD leave everything as is, and edit the default in /etc/default/grub


(assuming Ubuntu is the first in the grub menu). This will prevent the boot selection menu from showing up, without actually changing the dual boot config

share|improve this answer
thnx for your answer. Can i format the windows partition that is on the same disk as my ubuntu install from ubuntu? and if so how? – FLY Nov 23 '11 at 8:45
@FLY yes; (1) be careful, don't wipe the wrong stuff (2) use gparted GUI partitioner or (2b) blkid to spot the partition, mkfs.ext4 /dev/sdXY (where sdXY is the partition found earlier). – sehe Nov 23 '11 at 8:47
so the windows partition shows up as /dev/sdXY with partition and file system unallocated? – FLY Nov 23 '11 at 9:08
@FLY: you mean, after that? Yes/no: in fact it will be formatted as an empty (ext4) filesystem), that won't be mounted if that is what you mean. You can do whatever you want with the space (including, say, mounting it). See or for general partitioning guidance – sehe Nov 23 '11 at 9:14
nope I mean after I open gparted GUI. I have 2 locations /dev/sda and /dev/sdb . /dev/sda contains 2 partions /media/sytem reserved and /host in /dev/sda1 /dev/sda2. /dev/sdb contains an unallocated partition. my questions is how do i find out which one is my windows partion or does it mean i have 2 hdd in this pc? – FLY Nov 23 '11 at 9:27

It depends how you want to use the space that your old operating system used; if you want to make it another filesystem that you mount via /etc/fstab, then you can simply reformat it with mkfs(8), add the appropriate mount(8) options to your fstab(5), and go for it.

If you want it to be part of your /home or / partition transparently -- which is nice for not having to manage your storage explicitly -- then a complete re-install is the easier approach.

My suggestion is to use it as a /movies or /home or something until it is time to buy a new drive -- but that's primarily because I'm lazy.

share|improve this answer

You must log in to answer this question.

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