How do I exclude packages from apt upgrades?

How do I exclude packages from apt upgrades?

Follow the below command to exclude or hold the specific Debian package from update.

  1. Using Apt Command $ sudo apt-mark hold package-name.
  2. Using Dpkg Command $ echo “package-name hold” | sudo dpkg –set-selections.
  3. Using Aptitude $ sudo aptitude hold package-name.
  4. Using Apt Command $ sudo apt-mark unhold package-name.

What is the difference between apt-get upgrade and dist upgrade?

apt-get upgrade will not change what is installed (only versions), apt-get dist-upgrade will install or remove packages as necessary to complete the upgrade, apt upgrade will automatically install but not remove packages. apt full-upgrade performs the same function as apt-get dist-upgrade .

How to list available updates and updateable packages with APT?

How To List Available Updates and Updateable Packages with Apt, Apt-Get, Aptitude Commands? apt and apt-get provides online package update for the deb based distributions. We can list currently available updates of the current system with these apt and apt-get commands in different ways.

Do you need to unhold a package before upgrading?

In 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. Now, the unhold packages will be upgraded with apt upgrade or unattended upgrades. In this tutorial, you have learned to hold packages from unnecessary upgrades.

What happens when you mark a package with aptitude?

When you mark a package with aptitude, you don’t have a return. # aptitude hold virtualbox No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Need to get 0 B of archives.

Why is it important to maintain a specific version of a package?

When working on some projects, sometimes you need the stability of your environment. Updating a package can cause the entire project to fail. Sometimes, we accidentally upgrade those packages which and this creates a serious issue on the server. This is why it can be important to maintain a specific version of a package.