SOLVED Update Manager and Kernels

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
krustybaguette
Level 3
Level 3
Posts: 151
Joined: Thu Mar 31, 2011 8:24 am

SOLVED Update Manager and Kernels

Post by krustybaguette »

Here's my system information on Lenovo Thinkpad T-520:
  • Release Linux Mint 18.3 Sylvia 64-bit
  • Kernel Linux 4.15.0-30-generic x86_64
  • MATE 1.18.0
  • MATE 1.18.0
  • Intel® Core™ i5-2520M CPU @ 2.50GHz × 4
I've been accepting all kernel upgrades, headers, etc. for a few months after never having done so after several years or running Mint.
Everything seems to be working pretty well but I'd like to clean up my list of available kernels in Update Manager/kernels. At present I have
representatives of kernel families 4.4 4.8 4.10 4.11 4.13 and 4.15

At the moment my update manager shows available updates for 4.4.134.140 and 4.15.0-33.36~16.04.1

Part of my problem is trying to fathom the (il)logic of the kernel numbering system. If I understand it correctly the way I listed my available kernels
ranging from 4.4 thru 4.15 the 4.4 family is the oldest and the 4.15 is the most recent. I don't want to get rid of everything other than whatever kernel
I maintain but it seems like it would be safe, and probably prudent , to get rid of all the 4.4 4.8 4.10 and 4.11 entries and the accept the upgrade
to the 4.15.0 entry currently in my update manager.

However since both of the available upgrades are designated a priority "4" or potentially dangerous, I'm inclined to just stay with the 4.15.0-30 kernel after
getting rid of all the excess baggage. Of all the 4.4 4.8 4.10 and 4.11 kernels list only one is "installed". Can I remove all the references to these old kernels?

Could this procedure possibly be dangerous?

krustybaguette
Last edited by krustybaguette on Sat Aug 25, 2018 2:40 pm, edited 1 time in total.
User avatar
catweazel
Level 19
Level 19
Posts: 9885
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Update Manager and Kernels

Post by catweazel »

krustybaguette wrote:
Fri Aug 24, 2018 8:48 pm
At the moment my update manager shows available updates for 4.4.134.140 and 4.15.0-33.36~16.04.1

However since both of the available upgrades are designated a priority "4" or potentially dangerous, I'm inclined to just stay with the 4.15.0-30 kernel after
getting rid of all the excess baggage. Of all the 4.4 4.8 4.10 and 4.11 kernels list only one is "installed". Can I remove all the references to these old kernels?

Could this procedure possibly be dangerous?
Not really. Boot into your preferred kernel and do this in a terminal:

Code: Select all

sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`
Then this:

Code: Select all

sudo apt-get purge linux-image-...
Replace ... with the kernel designation that you want to remove. You may want to leave only the current kernel and one version previous to it.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
krustybaguette
Level 3
Level 3
Posts: 151
Joined: Thu Mar 31, 2011 8:24 am

Re: Update Manager and Kernels

Post by krustybaguette »

Thanks Cat for the quick reply but I copied and pasted the first entry and instead of a prompt for my password nothing happened and I ended up with a ">" at the end of the string.
Is it possible that the processes indicated would take a while to complete?
krusty

after a little command line self-help I got logged via sudo su and the ran the first line which gave me this result:

kenneth-ThinkPad-T520 kenneth # sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`
linux-image-4.10.0-38-generic
linux-image-4.13.0-37-generic
linux-image-4.13.0-38-generic
linux-image-4.13.0-39-generic
linux-image-4.13.0-41-generic
linux-image-4.13.0-43-generic
linux-image-4.13.0-45-generic
linux-image-4.15.0-24-generic
linux-image-4.15.0-29-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.13.0-37-generic
linux-image-extra-4.13.0-38-generic
linux-image-extra-4.13.0-39-generic
linux-image-extra-4.13.0-41-generic
linux-image-extra-4.13.0-43-generic
linux-image-extra-4.13.0-45-generic


Do I need to run the purge command for each of the linux-images that I wish to get rid of?

Or since my "active" kernel is 4.15.0-30 and it is not listed will that purge command eliminate all of the above list? Then I could use update manager
to update to the most recent 4.15.0-# leaving me with the new active kernel and the one I'm using at present as a fallback.
kb
Last edited by krustybaguette on Fri Aug 24, 2018 9:38 pm, edited 1 time in total.
User avatar
catweazel
Level 19
Level 19
Posts: 9885
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Update Manager and Kernels

Post by catweazel »

krustybaguette wrote:
Fri Aug 24, 2018 9:23 pm
Thanks Cat for the quick reply but I copied and pasted the first entry and instead of a prompt for my password nothing happened and I ended up with a ">" at the end of the string.
Is it possible that the processes indicated would take a while to complete?
krusty
Try again but make sure you copy the entire line. It works here:

Code: Select all

~ $: sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`
[sudo] password for catweazel: 
linux-image-4.15.0-32-lowlatency
linux-image-lowlatency
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
krustybaguette
Level 3
Level 3
Posts: 151
Joined: Thu Mar 31, 2011 8:24 am

Re: Update Manager and Kernels

Post by krustybaguette »

When I run the second command
sudo apt-get purge linux-image-... Can I use a wildcard to get rid of all the images that are listed here?

linux-image-4.10.0-38-generic
linux-image-4.13.0-37-generic
linux-image-4.13.0-38-generic
linux-image-4.13.0-39-generic
linux-image-4.13.0-41-generic
linux-image-4.13.0-43-generic
linux-image-4.13.0-45-generic
linux-image-4.15.0-24-generic
linux-image-4.15.0-29-generic
linux-image-extra-4.10.0-38-generic
linux-image-extra-4.13.0-37-generic
linux-image-extra-4.13.0-38-generic
linux-image-extra-4.13.0-39-generic
linux-image-extra-4.13.0-41-generic
linux-image-extra-4.13.0-43-generic
linux-image-extra-4.13.0-45-generic
kb
User avatar
catweazel
Level 19
Level 19
Posts: 9885
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Update Manager and Kernels

Post by catweazel »

krustybaguette wrote:
Fri Aug 24, 2018 9:49 pm
When I run the second command
sudo apt-get purge linux-image-... Can I use a wildcard to get rid of all the images that are listed here?
Yes, but be sure of where you put the * or ? as you could delete everything.

Code: Select all

linux-image-extra-4.10*
linux-image-extra-4.13*
That will remove all 4.10 and 4.13 kernels, leaving only the two 4.15 kernels.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
krustybaguette
Level 3
Level 3
Posts: 151
Joined: Thu Mar 31, 2011 8:24 am

Re: Update Manager and Kernels

Post by krustybaguette »

Cat, thank you so much. That's what I thought would be the answer but I was timid to do it for the reason you stated about possibly blowing the whole thing up.
Post Reply

Return to “Installation & Boot”