Debian-Ubuntu How to not upgrade a package
How can you not upgrade a package or packages to Ubuntu / Debian Linux? How can you create a package update blacklist using the apt / apt-get command?
Below we will see how we can not upgrade packages using the apt, apt-mark option in Debian or Ubuntu Linux.
The apt-mark method works with installed and uninstalled packages.
We usually run the following two commands to update all packages:
sudo apt update && sudo apt upgrade
sudo apt-get update && sudo apt-get upgrade
Let's see a list of available updates:
Run the apt command:
sudo apt list –upgradable
Now how can you force apt-get to keep a package named geany using apt-mark
The apt-mark booking option can be used as follows to prevent the package from being automatically installed, upgraded or removed:
sudo apt-mark hold package_name
sudo apt-mark hold geany
Display a waiting list of packages
How to view a waiting list of packages:
Do you want to cancel a package you have specified in the list? Try:
sudo apt-mark unhold package_name
sudo apt-mark unhold geany