So just today I went to run updates on my Ubuntu 9.10 (Karmic) machine, only to get an error message stating that there was not enough space left. Now, I saw this once before, and luckily the fix is pretty simple though it may be a little confusing for new Ubuntu users.
I have my /boot folder, where the kernels are stored so the boot loader can take them and boot them, on a different partition. Said partition is sized at 64 MB. Now, when Ubuntu installs a new kernel it does not remove the old ones. This isn’t necessarily a bad thing; if a new kernel doesn’t work for some reason you can just boot into an old one. And, of course, by default the installer does not set up a separate partition for /boot. So over time things build up. I checked, and sure enough, this partition was almost filled! The fix is easy.
First, go into a terminal and take note of the version of the kernel you are using. Just type this:
uname -r
Remember this (leave the window open in the background). Next, open the Synaptic Package Manager (System->Administration->Synaptic Package Manager, enter your password if prompted) and search for ‘linux-image’ (no quotes) in the search bar. When a list comes up, sort it by which ones you have installed and take note. You’ll probably have several kernels highlighted (I had 4). Select them all and mark them to be removed completely – this way you can be sure those files under /boot will be deleted. Be sure NOT to uninstall the kernel you are currently using, as your system needs that to run, obviously. You might also leave the previous version just in case something does go wrong, along with any custom or non-standard kernel you have in there (such as linux-rt, the realtime kernel for audio work). Now hit apply, and let the package manager do its thing.
When it’s done try running your update again, it should succeed (or at least that error should go away).