You are not logged in.

#1 2026-08-31 15:23

radko
Member
Registered: 2026-04-21
Posts: 15

Remove old kernels, how?

How to uninstall older Linux kernels and dependencies to save space?

Offline

#2 2026-09-01 08:14

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,604

Re: Remove old kernels, how?

sudo apt search linux-image-* | grep installed

This is mine.

linux-headers-6.12.101+deb13-amd64/stable-security,now 6.12.101-1 amd64 [installed,auto-removable]
linux-headers-6.12.105+deb13-amd64/stable-security,now 6.12.105-1 amd64 [installed,automatic]
linux-headers-6.12.107+deb13-amd64/stable-security,now 6.12.107-1 amd64 [installed,automatic]
linux-headers-6.12.74+deb13+1-amd64/now 6.12.74-2 amd64 [installed,local]
linux-image-6.12.101+deb13-amd64/stable-security,now 6.12.101-1 amd64 [installed,auto-removable]
linux-image-6.12.105+deb13-amd64/stable-security,now 6.12.105-1 amd64 [installed,automatic]
linux-image-6.12.107+deb13-amd64/stable-security,now 6.12.107-1 amd64 [installed,automatic]
linux-image-6.12.48+deb13-amd64/now 6.12.48-1 amd64 [installed,local]
linux-image-6.12.74+deb13+1-amd64/now 6.12.74-2 amd64 [installed,local]
linux-image-amd64/stable-security,now 6.12.107-1 amd64 [installed]

I then just step through the list one by one using sudo apt remove to just leave 2 kernels followed by sudo apt autoremove to clear any kbuild and header files

sudo apt remove linux-image-6.12.101+deb13-amd64
The following packages were automatically installed and are no longer required:
  linux-headers-6.12.101+deb13-common   linux-kbuild-6.12.101+deb13
  linux-headers-6.12.74+deb13+1-common  linux-kbuild-6.12.74+deb13+1
Use 'sudo apt autoremove' to remove them.

REMOVING:
  linux-headers-6.12.101+deb13-amd64  linux-image-6.12.101+deb13-amd64

If you have Synaptic installed you can just use that and pick all the ones you want to remove in one go.

Offline

#3 2026-09-01 16:07

radko
Member
Registered: 2026-04-21
Posts: 15

Re: Remove old kernels, how?

Thanks a lot
For me working solution is Synaptic.

Offline

#4 2026-09-19 17:06

Midas
Member
Registered: 2017-12-15
Posts: 271

Re: Remove old kernels, how?

Anything wrong with this?  neutral

$ sudo apt-get autoremove

Offline

#5 2026-09-20 07:31

Taige
Member
Registered: 2025-08-19
Posts: 74

Re: Remove old kernels, how?

Does removing old kernels have the advantage of saving disk space, or does it also affect performance?

Offline

#6 2026-09-20 08:17

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 6,378
Website

Re: Remove old kernels, how?

Taige wrote:

... or does it also affect performance?

No performance impact.

Offline

#7 2026-09-20 10:15

Taige
Member
Registered: 2025-08-19
Posts: 74

Re: Remove old kernels, how?

q4osteam wrote:
Taige wrote:

... or does it also affect performance?

No performance impact.

Some time ago I read that an ssd that is not full can help keep it in excellent health because a drive with free space certainly reduces wear and tear and this consequently improves its performance.
I think that the removal of old kernels also has a positive impact on this aspect even if it does so indirectly.

If the reasoning is wrong, explain to me how it is, I'm trying to understand.

Offline

Registered users online in this topic: 0, guests: 1

Board footer

Powered by FluxBB
Modified by Visman