Hold or Exclude Packages from Upgrade
Use the following command to exclude or hold a specific Debian package from an update. This will turn off the updates of specified packages from an automatic upgrade or manual upgrades. Using apt- Using dpkg
- Using aptitude
Change the package_name with your actual package name to be set on hold.
List Packages on Hold
You can check the packages on hold anytime. Use the following command to view all packages already set to hold.Unhold or Enable Package Upgrade
In the future, If you need to upgrade any package set on hold. You need to unhold any package before an upgrade. Use one of the following commands to unhold any package. Using apt- Using dpkg
- Using aptitude
Now, the unhold packages will be upgraded with apt upgrades or unattended-upgrades.