How can you not upgrade one packet or packages on Ubuntu/Debian Linux? How can you blacklist package updates 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 reservation option can be used as follows to prevent automatic installation, upgrade or removing the package:
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:
apt-mark showhold
Cancel waiting
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