How to Prevent Ubuntu kernel Update – Disable or Stop Linux Kernel Update

If you want to hold the Linux kernel update for some reason on your Ubuntu, then follow below steps in this article. Using this method you can update your Ubuntu Linux system without Updating the Linux Kernel. It will save some space in your system and also prevent the some manual system kernel related configuration changes. But holding the kernel update is not a good idea.


Hold Ubuntu Linux Kernel Update

Open your terminal application. You can open it by press ctrl+alt+t together.

Stop the Ubuntu Kernel Update via apt:


Replace linux-package-name with actual linux kernel image.

sudo apt-mark hold <linux-package-name>


sudo apt-mark hold linux-image-generic linux-headers-generic
sudo apt-get update

Prevent Ubuntu kernel Update (1)

Enable Ubuntu kernel Update:

You can enable kernel updates via below command.

sudo apt-mark unhold linux-image-generic linux-headers-generic

Prevent Ubuntu kernel Update (2)

Stop the Ubuntu Kernel Update via config file:

In terminal run

sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Scroll down and locate the blacklist section and edit like below with the Linux kernel packages. Here regex is also supported.

Unattended-Upgrade::Package-Blacklist {

Stop the Ubuntu Kernel Update via dpkg:

echo "<Linux-package-name> hold" | sudo dpkg --set-selections

Above syntax is conman for all packages to hold. For Linux kernel replace the Linux-package-name with your Linux kernel image.

echo linux-image-5.4.0-33-generic hold | sudo dpkg --set-selections
echo linux-image-generic hold | sudo dpkg --set-selections
echo linux-generic hold | sudo dpkg --set-selections
If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.

Also Read:  How to Play Audio Files on Ubuntu Terminal Using Sox

Leave a Reply