Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

About 2 months ago I've installed ubuntu 12.04 on a new computer. I remember, there were some problems with disc sectors, unfortunately I can't remember now on what it consisted.

I have 15 GB for \ and the rest for \home (total disc space - 320GB). I was pretty sure it's enough. But today after I've installed updates (kernel updates included), I couldn't restart the computer. There was an information, that the \ partition is full, so the computer will be working in low graphic mode, but the next window was not active, so I couldn't enter "low graphics mode". Now I'm working on trial version of ubuntu, using install usb drive.

I don't know how to change the size of the partitions now, but beside that I'm not sure if this would be the solution since I'm not sure if the partition is really full - during the installation, I've made this partition much bigger that it was said in the tutorial and I don't have any special applications (ubuntu, latex, some other small stuff).

In "proprieties" of the system partition is said that total capacity is 15,1 GB and 15,1 GB is used. The output of df -h is:

ubuntu@ubuntu:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/cow           1008M  146M  811M  16% /
udev            1.9G  4.0K  1.9G   1% /dev
tmpfs           778M  876K  778M   1% /run
/dev/sdb1       1.9G  1.7G  177M  91% /cdrom
/dev/loop0      663M  663M     0 100% /rofs
tmpfs           1.9G  8.0K  1.9G   1% /tmp
none            5.0M  4.0K  5.0M   1% /run/lock
none            1.9G   80K  1.9G   1% /run/shm
/dev/sda1        15G   14G     0 100% /media/adc83ce8-fc1e-447c-a61c-f69fc0e15ecc
/dev/sda6       278G   83G  181G  32% /media/485f3e29-355c-4be3-b80a-1f5abd5604b6

Thanks for any suggestions

UPDATE

I've followed Saurav's Kumar and oldfred's suggestions.

After this I've recovered about 800 MB of free space. Still I don't understand why my system takes so much space. I'm hesitating a bit with "scary" suggestion of mikewather, but maybe I'll have to take a risk :) Or is there anything else I could do, less "scary "?

UPDATE:

I'm reopening the question since the problem persist. Last time, when I managed to boot my computer, I've made / bigger, but now I have once again full system partition, I don't know why. I wanted to reinstall the system (there are some problems that I don't know how to "divide" in separate questions and I need my computer working quickly). I've downloaded the .iso file for Ubuntu 14.04 - and the system partition got full again. I thought since it's not installation but download, it should be on /home and not /, so why there is no more space after downloading it? And why 25 GB is not enough for /? I didn't install any important things since that time.

In any case I'd like to re-install the system, but I'd like to know why it's happening to avoid the same mistake during the new installation.

According to the replies to that question, my root partition is huge and I didn't install anything important since one year (since the time I changed it's size from 15 to 25 GB).

Thanks

share|improve this question
    
Hi Maria!! I've posted your solution in my answer.. Check it out. Please reply if you need any further assistance.. –  Saurav Kumar Sep 8 '13 at 15:11

3 Answers 3

You can solve your issue using Recovery Mode

Only thing you have to do is to remove some junked files/folders from /dev/sda1 i,e where you have installed Ubuntu

Follow these simple steps:

  • Reboot your system and chose Recovery Mode (Safe Mode) 2nd option in Grub Menu.

  • Select grub option from the list (chose yes for the question)

  • Then go to root in order to login as root

  • Then execute these commands in series in order to free some spaces..

    # apt-get autoclean
    # apt-get autoremove
    # apt-get clean
    

    apt-get clean will remove packages that left after installing any package. So don't worry for that..

  • Then go to your Your Home directory and remove following directories ( I'm assuming that your Ubuntu's User name is 'maria`):

    # cd /home/maria
    # rm -r .config .local .cache .fontconfig
    

    Above command will remove only your Users settings and Web history that you surfed using any web browser. So don't worry for that.. Your system will become new.

  • Then reboot your system:

    # reboot
    

Hope after rebooting your problem would be solved. Reply for further assistance..

share|improve this answer
    
Thanks for your reply. I just don't know how can I modify grub settings now. And since I have just one system, it was not showing up. I don't know how can I change the time the grub is showing up, booting from install usb drive... –  maria Sep 8 '13 at 16:17
    
@maria: Oho..! Got it.. You can get your Grub Menu by holding Shift key when your system starts.. If you still don't get Grub then you can boot through USB and delete files .config .local .cache etc.. from your older system.. I am sure this time you'll get your Grub Menu.. –  Saurav Kumar Sep 8 '13 at 16:33

Other answers have some good suggestions. But you also need to see why you used so much. If you have not installed a lot of very large applications you should not have used that much space. A 15GB root, while not generous is large enough for most users. I actually use about 7GB with a fair number of apps installed.

Sometimes a running system has errors and keeps posting into log file and log files then fill system. I would check that. If you can boot after minor houseclean:

cd /var/log

review for very large file & remove log files if no issues

sudo rm -f messages.*
sudo rm -v /var/log/*.gz

Lots more details:

https://help.ubuntu.com/community/RecoverLostDiskSpace

Otherwise you need to review if you have some very large files.

share|improve this answer

You could try the recovery mode, and the following two commands to free some space:

sudo apt-get clean

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

The first one deletes cached installation files, and should free a few hundred MB. The second (long and scary) removes all unused kernels and headers.

share|improve this answer

Your Answer

 
discard

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.