I have been using the Zabbly kernel for Ubuntu 22.04.4 LTS for several months now and it works great but Ubuntu still wants to install its own, generic kernel and I don't want it.
Question one: does the system need the generic kernel (modules, headers) for anything?
Question two: if the answer to question one is no, how do I blacklist the installation of new generic Ubuntu kernels?
I want to prevent the installation of any new Ubuntu kernels.
2024/04/24 update: I'm still being asked to install generic kernel packages.
apt wants to install
linux-headers-generic/jammy-updates 5.15.0.105.102 amd64 [upgradable from: 5.15.0.102.99]
apt-mark hold linux-headers-generic
linux-headers-generic was already set on hold.
Best Answer
Question 1: Does the system need the generic kernel?
Maybe, but probably not in your case. The generic kernel provides broad hardware compatibility and serves as the default for Ubuntu. If the Zabby kernel works flawlessly for your system, you likely don't need the generic kernel.
However, there are a few reasons you might still want the generic kernel:
Question 2: How to blacklist generic kernel updates?
It's possible to blacklist generic kernel updates, but it's generally not recommended. Kernel updates often contain security fixes and performance improvements. Here's how to do it with caution (proceed only if you're sure):
uname -r
to find the current kernel version (e.g.,5.15.0-46-generic
).apt
: Edit/etc/apt/apt.conf.d/50unattended-upgrades
(usesudo nano
). In theUnattended-Upgrade::Package-Blacklist
section, add the following lines (replace version with yours):dpkg
: (For more advanced users) Usesudo dpkg --set-selections hold linux-image-generic linux-headers-generic
. This holds all versions of these packages.Recommendation:
Instead of disabling updates, consider these alternatives: