Debian-Ubuntu How to not upgrade a package

How not to upgrade a package or packages to Ubuntu / 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 them below commands to update all packages:

sudo apt && 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 with the geany using apt-mark

The apt-mark hold option can be used as follows to prevent automatic installation, 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

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.100 registrants.

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).