Ubuntu Server – Manually removing kernel packages

After a number of kernel upgrades the file system gets filled up. Here is one way to clean up.

As root –

Display a list of installed kernel packages:

dpkg -l | grep linux-image

Display the running kernel (you don’t want to really remove this one do you?):

uname -a

After careful observation, remove the packages:

apt-get purge linux-image-3.2.0-23-generic, linux-image-3.2.0-24-generic

As a side, I tend to leave one additional kernel installed as a backup, unless there is a serious security/bug issue.