Is there a way to remove supported kernels no longer wanted?

Iacceptthelinuxchallenge

Gold Member
Gold Supporter
Joined
May 18, 2021
Messages
43
Reaction score
12
Credits
446
Like easily with a terminal prompt? I am tired of having to uncheck (The irritant.png) every time I need to update. o_O
 

Attachments

  • The irritant.png
    The irritant.png
    149.7 KB · Views: 228


Try sudo apt autoremove --purge

it should remove most crud
 
Here's a thread where I learned from Lord Boltar how to remove old kernels.

 
Run a Timeshift snapshot before removing kernels.

Wiz
 
Kernel list command on your device.
Code:
dpkg --get-selections | grep linux-image-
example output;
linux-image-4.4.0-21-generic install
linux-image-4.4.0-31-generic install

Code:
sudo apt purge linux-image-4.4.0-21-generic install

Don't delete the kernel you are using.
This command;
Code:
uname -a
will show you which kernel it is using.

Source; https://sudo.ubuntu-tr.net/eski-cekirdek-kernel-dosyalarini-temizleme
 
Last edited:
I assumed the 4.15 kernel is already deleted due to it no longer appearing in the attached screenshot. My issue is stated in the 1st discussion. Now I realize my original question should have been:
How to remove kernel update prompts from the Update Manager on kernels no longer installed?
 

Attachments

  • 4.15already removed.png
    4.15already removed.png
    177.6 KB · Views: 187
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.
 
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 type
Code:
sudo apt autoremove
To remove any dependencies that are not needed any more.
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.
 
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 type
Code:
sudo apt autoremove
To remove any dependencies that are not needed any more.
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.
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...
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.
Thank you.
 

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.

To me personally, the fact that I can keep old kernels to roll back to, is the best feature of Linux.
But it sounds like not all distro's support this.
 

Members online


Top