Remove all old kernels on your Ubuntu

When you login to your system and /boot is full, don’t panic!

Run this command and lean back, take a cup of coffee and relax, breath!

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge

When it’s done, it’s a good idéa to:

apt-get update && apt-get upgrade && apt-get dist-upgrade

Once again, lean back, take a cup of coffee, find your inner zen!

Source: http://askubuntu.com/questions/2793/how-do-i-remove-old-kernel-versions-to-clean-up-the-boot-menu

You may also like...