Disclaimer:
Please only do it if you know what you are doing and at your own risk!.
Last time I wanted to update my Ubuntu with the software updater and then I got this message:
Then I wanted to install updates using terminal (sudo apt-get upgrade command), and this includes new Kernel to my Ubuntu 14.04 dev box, but it failed to install new kernels, because I got no space left on my boot partition. You can see how much space left you have on your machine, open a terminal window and with the following command: df -h
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-root 212G 199G 2.7G 99% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 3.9G 4.0K 3.9G 1% /dev tmpfs 788M 1.4M 787M 1% /run none 5.0M 0 5.0M 0% /run/lock none 3.9G 1.3M 3.9G 1% /run/shm none 100M 64K 100M 1% /run/user /dev/sda2 237M 192M 33M 86% /boot /dev/sda1 511M 3.4M 508M 1% /boot/efi
As you can see I only have 33 MB left on my /boot partition.
So next we are going to see installed kernels on your system:
$ dpkg --list | grep linux-image ii linux-image-3.16.0-39-generic ... ii linux-image-3.16.0-40-generic ... ii linux-image-3.16.0-41-generic ... ii linux-image-3.16.0-43-generic ...
Now we are going to see which Kernel version is running now:
$ uname -r 3.16.0-43-generic
So we have kernel version 3.16.0-43-genericas currently. So we are going to remove in this case 3.16.0-39 and 3.16.0.40. You can use this command
$ sudo apt-get purge linux-image-3.16.0-39-generic $ sudo apt-get purge linux-image-3.16.0-40-generic or $ sudo apt-get purge linux-image-[tab][tab] (Yes tab key to auto-complete.)
Now you can update your Ubuntu as usual, with a simple:
$ sudo apt-get upgrade