r/linuxmint • • 28d ago

Support Request Can't Remove Old Kernels

[code]

System:

Kernel: 6.8.0-147-generic arch: x86_64 bits: 64 compiler: gcc v: 13.3.0 clocksource: tsc

Desktop: Cinnamon v: 6.6.9 tk: GTK v: 3.24.41 wm: Muffin v: 6.6.3 tools: cinnamon-screensaver

vt: 7 dm: LightDM v: 1.30.0 Distro: Linux Mint 22.3 Zena base: Ubuntu 24.04 noble

Machine:

Type: Convertible System: LENOVO product: 20M7S0BN00 v: ThinkPad L380 Yoga

CPU:

Info: quad core model: Intel Core i5-8250U bits: 64 type: MT MCP smt: enabled arch: Coffee Lake

rev: A cache: L1: 256 KiB L2: 1024 KiB L3: 6 MiB

Speed (MHz): avg: 1940 high: 2000 min/max: 400/3400 cores: 1: 2000 2: 2000 3: 2000 4: 1726

5: 1999 6: 1800 7: 2000 8: 2000 bogomips: 28800

Hi, I am very new to Linux and also Mint. I have seen that removing old kernels is a good idea so I thought I would give it a go. I went in via Update manager>View>Linux kernels. So far, so good. I decided that to begin with, I would only remove those kernels marked 'End of Life'. Nice and safe. The trouble is that there is no 'remove kernel' button when I select one of these. There is a big button at the bottom that says 'Remove Kernels' but this has a pre-selected group of kernels that I don't want to remove already listed. On each of the EOL kernels there is a button to install but not to remove. There is also a button to queue installation but this is of no use. I have tried to look this up, but each answer suggests there should be a remove button on the kernal but mine doesn't?

I would prefer to go down this route before trying the CLI route. Thanks for any help.

11 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/Standard_Tank6703 LMDE7, 12 yr LM experience, "No obligation to enjoy" 28d ago

Yeah, you probably haven't been tinkering around with it and installing kernels manually. But even that would eventually age out.

It is possible however to force automatic marking on a kernel.

Here is a little test using xed (text editor) and aptitude. It also works using apt.

apt list xed
sudo aptitude markauto xed
apt list xed

and to undo it and return it to manual - I couldn't get it to work in apt, but it is documented and works in aptitude:

sudo aptitude unmarkauto xed
apt list xed

FWIW, aptitude was the actual program used by Cinnamon's software manager and update manager, last time I looked. Not apt and not apt-get.