9.04, /boot partition is near full and no new updates can be installed

Asked by Tirrex_Falcon on 2009-12-09

I recently tried to run some updates and was greeted with an error message that stated that the /boot partition (100mb) was full and I needed to run "sudo apt-get clean" to fix this. I did that and nothing changed. How do I clear out the partition so that I can run the updates?

Thanks,

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Tirrex_Falcon
Solved:
2009-12-09
Last query:
2009-12-09
Last reply:
2009-12-09
Tirrex_Falcon (matthew-tidd) said : #1

I just ran it again so here is the full error.

Not enough free disk space

The upgrade needs a total of 15.7M free space on disk '/boot'. Please free at least an additional 9324k of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.

You most likely have a tonne of kernels installed which you no longer need and are clogging up the system. This is normal in Ubuntu as old kernels are retained (annoyingly)

Lets get you cleared up.

Please give the output of:

uname -a; dpkg -l | grep linux-image

Thanks

Tirrex_Falcon (matthew-tidd) said : #3

Linux Balance 2.6.28-16-generic #55-Ubuntu SMP Tue Oct 20 19:48:24 UTC 2009 i686 GNU/Linux
ii linux-image-2.6.27-11-generic 2.6.27-11.31 Linux kernel image for version 2.6.27 on x86/x86_64
rc linux-image-2.6.27-7-generic 2.6.27-7.16 Linux kernel image for version 2.6.27 on x86/x86_64
rc linux-image-2.6.27-9-generic 2.6.27-9.19 Linux kernel image for version 2.6.27 on x86/x86_64
ii linux-image-2.6.28-11-generic 2.6.28-11.42 Linux kernel image for version 2.6.28 on x86/x86_64
ii linux-image-2.6.28-13-generic 2.6.28-13.45 Linux kernel image for version 2.6.28 on x86/x86_64
ii linux-image-2.6.28-14-generic 2.6.28-14.47 Linux kernel image for version 2.6.28 on x86/x86_64
ii linux-image-2.6.28-15-generic 2.6.28-15.52 Linux kernel image for version 2.6.28 on x86/x86_64
ii linux-image-2.6.28-16-generic 2.6.28-16.55 Linux kernel image for version 2.6.28 on x86/x86_64
ii linux-image-generic 2.6.28.16.21 Generic Linux kernel image

Yep you have a LOT of kernels there. These will take up space in /boot as well as the system as a whole.

You are on kernel 2.6.28-16-generic

You can therefore tidy up the old kernels with this command

sudo apt-get --purge remove linux-image-2.6.27-11-generic linux-image-2.6.28-11-generic linux-image-2.6.28-13-generic linux-image-2.6.28-14-generic linux-image-2.6.28-15-generic; sudo dpkg -P linux-image-2.6.27-7-generic; sudo dpkg -P linux-image-2.6.27-9-generic; sudo apt-get --purge autoremove; sudo apt-get update; sudo apt-get -f install; sudo apt-get dist-upgrade; sudo apt-get clean

You will now only have ONE kernel installed. This will reduce the space in /boot and each kerrnel will give you about 120Mb in space per kernel.

You should now have space to upgrade (the last few commands DO actually upgrade the system for you)

Tirrex_Falcon (matthew-tidd) said : #5

Many thanks Actionparsnip, that did the trick!

Keeping kernels to a minimum is essential in low space situations (netbooks especially suffer this dread)

Glad you got the gold