Skip to content
Blog How to uninstall or remove old kernels in Ubuntu

How to uninstall or remove old kernels in Ubuntu

Ubuntu always keeps the old kernel even after installing a new kernel. This is done just in case the new one doesn’t work well for you.

Now if you don’t want the old kernels anymore then use the command below to remove the old kernel which you wish to remove.

$ sudo apt-get remove --purge 2.6.28-11*

replace 2.6.28-11 with the version you wish to remove.

Hope this helps…

3 thoughts on “How to uninstall or remove old kernels in Ubuntu”

  1. OLDKERNELS=$(dpkg -l|awk ‘{print $2}’|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)

    sudo aptitude purge $OLDKERNELS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.