how to get rid of unused kernels?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
felsenstern
Level 1
Level 1
Posts: 15
Joined: Mon Dec 13, 2021 4:24 am

how to get rid of unused kernels?

Post by felsenstern »

Hiya,

I have 3 kernels installed on my system (5.4.0, 5.13.0 and 5.14.0) 5.4 was the kernel originally installed with Mint Cinnamon. 5.13 was installed later to make my Ethernet hardware work and since the last systemd update caused some bugs, I installed the new 5.14 kernel to make the systemd update bugs go away.

Now I have all three kernels installed on my system and the only one I really use is the 5.14.0 but I still receive updates all three and I wondered what I would have to do to de-install 2 of these kernels.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
HAWR
Level 9
Level 9
Posts: 2713
Joined: Thu Jun 06, 2019 1:15 pm

Re: how to get rid of unused kernels?

Post by HAWR »

Hello felsenstern,

you can easily do this in the update manager > view > linux kernels with removing the not needed kernels. I would suggest to have two kernels on the system. One good working kernel and one for emergency.
User avatar
spamegg
Level 14
Level 14
Posts: 5117
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: how to get rid of unused kernels?

Post by spamegg »

Update Manager/Edit/Preferences/Automation, see bottom
kernel.png
ralplpcr
Level 6
Level 6
Posts: 1096
Joined: Tue Jul 28, 2015 10:11 am

Re: how to get rid of unused kernels?

Post by ralplpcr »

If you don't think you'll need your older kernel, another way to do it is via the terminal. As a bonus, this method will also clean up the junk remaining from other packages that is no longer being used:

Code: Select all

sudo apt autoclean
sudo apt autoremove --purge
i generally do this after each kernel update. Typically, it can free up between 300MB-800MB.... YMMV, of course.

**Always have a backup, and pay attention with the autoremove function. If it prompts you that it's removing something you want to keep, you have 1 chance to tell it "No". It generally works well for me, but it can be dangerous if you're not paying attention!
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: how to get rid of unused kernels?

Post by Hoser Rob »

I just do sudo apt autoremove in the terminal, it always keeps the 2nd newest kernel intact. That's a very good idea because you should always keep the last kernel that worked. I'm not trying to show off my CLI-fu (I got tied of CLI in the 80s) but once you get a bit used to it doing it like this is easier and quicker.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
Locked

Return to “Beginner Questions”