Comments on: How To Exclude Packages from Apt-Get Upgrade https://tecadmin.net/exclude-packages-from-apt-upgrade/ How to guide for System Administrator's and Developers Thu, 12 Nov 2020 17:18:59 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Leonardo B. https://tecadmin.net/exclude-packages-from-apt-upgrade/#comment-55588 Thu, 12 Nov 2020 17:18:59 +0000 https://tecadmin.net/?p=12224#comment-55588 Hi Rahul,
In my experience, in Ubuntu 16.04 LTS, with kernel 4.15.0-120, if you want to ‘hold’ the kernel it in that version, but if you still have installed the packages:
linux-image-generic
linux-headers-generic
linux-image-generic-hwe-16.04
linux-headers-generic-hwe-16.04
It will NOT work. Took me a while to figure it out, since apt-mark, aptitude hold, and dpkg –set-selections methods were not preventing the install of new version of the Linux kernel.

Basically, remove these packages. They do not provide the kernel, so you won’t break the system.

They are a placeholder for all kernel packages versions, so the apt system knows that it has to install (instead of update the package as it would be with all other packages — kernel is a special package in this concern!) a new package in order for the kernel to be updated.

This worked for me:
apt remove linux-image-generic linux-headers-generic linux-image-generic-hwe-16.04 linux-headers-generic-hwe-16.04

I hope this helps someone else 🙂

]]>
By: Rahul K. https://tecadmin.net/exclude-packages-from-apt-upgrade/#comment-17192 Thu, 26 Jul 2018 05:34:44 +0000 https://tecadmin.net/?p=12224#comment-17192 Thanks Jack, I have corrected the command.

]]>
By: Jack D. Ripper https://tecadmin.net/exclude-packages-from-apt-upgrade/#comment-17119 Wed, 25 Jul 2018 09:23:03 +0000 https://tecadmin.net/?p=12224#comment-17119 In the section: “Unhold or Include Package in Install”, the unhold command for aptitude is slightly wrong. Should be unhold not hold 🙂

]]>
By: Denilson https://tecadmin.net/exclude-packages-from-apt-upgrade/#comment-4426 Thu, 19 Oct 2017 12:10:07 +0000 https://tecadmin.net/?p=12224#comment-4426 Thanks for the post!

]]>