Removing kernels

GTP

Well-Known Member
Reaction score
9,780
Location
Adelaide, Australia
I just updated to the latest 4.4.0-38 kernel on a Linux Mint "Sarah" laptop.
She has kernels back to 3.16.0-38 still installed.
Is it safe to remove all the old kernels?
 
Do you boot into the old kernels? If not then why waste the space. You might keep the next to newest just in case some bug gets reported and you feel you need to roll back.
 
  • Like
Reactions: GTP
Do you boot into the old kernels? If not then why waste the space. You might keep the next to newest just in case some bug gets reported and you feel you need to roll back.
Don't really know why I asked this question, as I already knew the answer. Just wanted to bounce it off someone else.:)
"Do you boot into the old kernels?"
No, she was just worried that if there was a problem she could go back! I explained to her that she will never need to go back that far, so I purged all but the last 3 to keep the client happy!.
I do daily snapshots for this client with Back In Time as well so I really couldn't see why she would want to keep all the old kernels.
She also uses Grsync to manually select "important" files at random.
 
Not sure on Mint but on my CentOs servers, I use this command: "package-cleanup --oldkernels --count=1 -y" 1 is the amount of kernels to keep
 
  • Like
Reactions: GTP
dpkg --list | egrep -i --color 'linux-image|linux-headers to list all

or sudo apt-get --purge remove linux-image-x.xx.x-xx-generic to remove one at a time.

sudo apt-get --purge autoremove to remove all unused.
You can remove not-in-use kernels from the Update Manager: View>Linux kernels. Click through the warning and it's self-explanatory from there.

(Edit) You can only remove one at a time, but it's easier to see what's what.
 
  • Like
Reactions: GTP
You can remove not-in-use kernels from the Update Manager: View>Linux kernels. Click through the warning and it's self-explanatory from there.
That's too easy, especially when your client is looking over your shoulder, lol
Doing it on the command line makes me look like a "guru" and discourages them from 'doing it themselves!';):cool:
 
That's too easy, especially when your client is looking over your shoulder, lol
That ist not the really important thing. If such tools avoid you from beeing a "guru" worj harder on your charism B-)
Doing it on the command line makes me look like a "guru" and discourages them from 'doing it themselves!';):cool:
That's the real reason for using the command line. I've had a client ho meant everything not having an icon on the desktop is not neccessary and could be deleted..... after that he not only asked himself why his computer doesn't start over any more.
 
Back
Top