Old Kernels

7 réponses [Dernière contribution]
lloydsmart

I am a member!

Hors ligne
A rejoint: 12/22/2012

Hi,

My Trisquel 7 installation just updated itself from linux-image-3.13.0-43-generic to linux-image-3.13.0-44-generic. Which is great, no probelm with that.

The question I have, though, is why it doesn't remove the old kernel when it does this? With most other software, the new version replaces the old one after an apt-get upgrade. Yet with kernels, it seems to leave the old verison in place. I can manually remove the old kernel and header files with apt-get remove, but I just wonder why this doesn't happen automatically?

Thanks.

onpon4
Hors ligne
A rejoint: 05/30/2012

So if for some reason the new kernel causes problems, you can revert to the old one. Otherwise, if such a thing were to happen, you might not be able to boot.

lloydsmart

I am a member!

Hors ligne
A rejoint: 12/22/2012

I see. Maybe there should be some sort of mechanism to make sure old kernel versions don't "pile up", though. Like maybe only keeping the current version plus the most recent old version, and deleting anything older than that. Just a thought.

rakyi
Hors ligne
A rejoint: 05/09/2014

Seems that it should be working like that, but it currently isn't (using any form of possible package upgrade methods). Not sure, though.

http://askubuntu.com/questions/369105/what-is-ubuntus-policy-on-keeping-old-kernels

https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1175637

davidnotcoulthard (non vérifié)
davidnotcoulthard

When (other) packages are updated, a package replaces another of the exact same name.

When Linux is updated, Debian's (and Ubuntu's, J. Self's,...) packaging sets it up such that a new version has a name that's slightly different from the old one. This means that "de jure", APT considers it a different package that can coexist.

There are linux and linux-generic packages but those are dummy packages.

Just remove the kernels you want to remove. 1 version = 1 package.

Jodiendo
Hors ligne
A rejoint: 01/09/2013

lloydsmart questioning is actually a very interesting subject.

Here are my questions?
Why do they keep the old kernels that are listed as old/version after 4 updates?
Why the old version is not deleted when you update them?
It sounds a bit heavier on your hard drive space, to keep accommodating old files

Could someone enhance my knowledge intelligently?

Thank You

davidnotcoulthard (non vérifié)
davidnotcoulthard

(As I've said above) Unlike (most) other pacakges, different versions of the kernel are provided in different packages, and because of that don't overwrite each other. To remove them you've got to manually do so by locating their packages.

Or if they're installed only because one of the "linux" meta packages dragged them, This should do:
sudo apt-get autoremove --purge