When upgrading Ubuntu from 11.10 to 12.04 I discovered an unexpected problem. The upgrade was stopped because there wasn't enough free space for the installation. I managed to free some space and do the upgrade but now a prompt appears after logging in saying I'm out of space. This prompt asks me if I want to examine the problem. The "Disk Usage Analyser" is opened. In the top it says:

Total filesystem capacity: 47.0 GB (used: 13.5 GB available: 33.4 GB)

Folder -- Usage -- Size

/ -- 100% -- 12.5 GB

usr -- 44.8 % -- 5.6 GB

home -- 30.3 % -- 3.8 GB

lib -- 13.0 % -- 1.6 GB

var -- 9.1 % -- 1.1 GB

boot 2.5 % 309.5 GB

and a lot of small contributors like: etc, opt, sbin, bin etc.

I do not really understand this problem since the analyser in the top says that I have 33.4 GB left in this file system. What can I do to make Ubuntu use the remaining space?

If you run df -h, you'll see exactly how much space is left on the root device.

To resolve the issue, there are many, many ways you can proceed. In my opinion, the most simple are three:

uninstall some unused programs to free some space;

repartition your hard disk in order to make sda7 bigger;

reinstall Ubuntu, but this time creating a unique partition for everything.

If you want to go with the way 2 and need support, please provide the output full of sudo fdisk -l /dev/sda If none of those solution fit for your needs, give us some feedback and we may find something else with your help.

Whatever you'll choose, I must suggest you to backup your stuff before proceeding.

To repartition your hard disk: again, there are many options. I suggest you to do the following:

Create a Live CD with Ubuntu and boot with it, choose "Try Ubuntu" when asked and open GParted Partition Editor.

From there, you need to make sda8 smaller and move it to the right. To do so, right-click on /dev/sda8 and select Resize/Move (you may need to Unmount first). Set Free space preceding to 10240 MiB (10 GiB).

Then you need to make sda7 bigger: right-click it, choose Resize/Move and set both Free space preceding and following to 0.

Apply the operations (it may take several minutes) and close GParted.

Now you should have made your root partition big enough to hold your own files. You need to move them. From a terminal:

Some values may change, what's important is that you should see /home preceded and followed by one or more blank spaces. Once you have found the line, remove it.

Almost finished! What you need to do is to remove the old home partition and make use of the freed space. So, open GParted again, unmount sda7 and sda8, delete sda8 (right-click and Delete), make sda7 bigger (right-click, Resize/Move, set 0 to both Free space following and preceding). Finally, apply the operations and close GParted.

Now you are done. Reboot and from your own Ubuntu run df -h again. You will see that the available space for the root directory / has increased. You will also see that /home does not appear in the output.

Note: as you may have already noticed, repartitioning your disk is not a five-minutes task. Such operations are always risky: if you click the wrong button or if your computer experiences a power failure during the process, you will lose all of your data. Remember to backup before doing anything!