I'm running version 4 of the Kernel on Ubuntu 15.04 but I keep getting updates from 3.19. How can I prevent it checking for updates for this older kernel?
1 Answers
The kernel is updated because of an evolving dependency from kernel meta-packages. For example, my LTS-HWE kernel is updated because I have linux-headers-generic-lts-utopic
. This depends on the latest version of the Utopic kernel (rebuilt for Trusty) and when a new version comes out, the meta-package is updated to depend on it and therefore Ubuntu updates to it.
So the solution is simple: remove or pin the meta-package.
Finding the right package is a little tougher. As you're using a non-LTS release, you can probably just nuke the linux-{image,headers}-generic
packages. You can check what they depend on (remember I'm on 14.04 - your output will differ):
$ apt-cache depends linux-{image,headers}-generic
linux-image-generic
Depends: linux-image-3.13.0-55-generic
Depends: linux-image-extra-3.13.0-55-generic
Depends: linux-firmware
Conflicts: linux-image-generic:i386
linux-headers-generic
Depends: linux-headers-3.13.0-55-generic
Conflicts: linux-headers-generic:i386
But if you're still seeing potential upgrades after an apt update
, you might have other meta-packages depending on new kernels. Like my HWE one, for example. If you see this, you can do a reverse-depends search
$ apt-cache rdepends linux-image-3.16.0-41-generic
linux-image-3.16.0-41-generic
Reverse Depends:
linux-image-3.16.0-41-generic:i386
linux-signed-image-3.16.0-41-generic
linux-image-virtual-lts-utopic
linux-image-generic-lts-utopic
linux-image-extra-3.16.0-41-generic
And root through those until you find the package you need to kill. In my case that would be linux-image-generic-lts-utopic
.
You might find that the system tries to clean up after itself the next time you apt-get autoremove
, and delete the kernels that aren't depended on now. That would just leave you with your manually installed 4.x kernel. If you want to hold onto the current versions of the kernel, just run a
sudo apt-get install linux-image-3.16.0-41-generic
And Apt will mark them as "manually installed". Obviously, replace the package names with the ones you want to keep.
http://askubuntu.com/questions/18654/how-to-prevent-updating-of-a-specific-package
– aldwinaldwin Jun 16 '15 at 08:23