dpkg --get-selections | grep linux-image-
sudo apt purge linux-image-4.4.0-21-generic install
sudo apt autoremove
It does a great job of removing old kernels but be careful with it.Say hello to Ubuntu Cleaner, a system utility designed to clean browser caches, removed unneeded apps, and get shot of old kernels. It might just be yourwww.omgubuntu.co.uk
Thanks for the reply. So its the dependencies are what is left and cause the Update Manager to continue to offer updates. The code you mentioned removes the dependencies, and thus no more unwanted updates...If your using Mint then you can simply go to the update manager and uninstall which ever kernel you don't want then go to a terminal and typeTo remove any dependencies that are not needed any more.Code:
sudo apt autoremove
Or you can (Some would not agree) install ubuntu-cleaner from here.
It does a great job of removing old kernels but be careful with it.
Thank you.When you click on each of the kernel's in the list [boxes on the left] you then get a list in the main box of all the variations of that kernel, if it says superseded or end of life it is not installed, if it says installed, and you don't want it, click on it and delete [WARNING make sure you do not delete every kernel listed as installed , or you will be in trouble]
the list is a full list of all available kernels for your distribution build, and is there for you to install an old discontinued kernel if you need to for some reason.
By default, three kernels are kept–the newest and two previous–when yum or dnf are used to perform upgrades. The number of kernels to be kept before the package manager erases them is configurable in the /etc/dnf/dnf.conf or /etc/yum.conf files. I usually change the installonly_limit value to 9 to retain a total of nine kernels. This has come in handy on a couple occasions when I had to revert to a kernel that was several versions down-level.