Make pinned packages in Synaptic have a systemwide pin

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
tony37
Posts: 1306
Joined: Sat Jul 18, 2020 12:34 pm

Make pinned packages in Synaptic have a systemwide pin

#1 Post by tony37 »

When you pin a package in Synaptic, it isn't automatically pinned systemwide, although it won't be updated by MX Updater.
To prevent such packages from being updated when using for example "sudo apt upgrade" in the command line, you can use

Code: Select all

sudo ln -s /var/lib/synaptic/preferences /etc/apt/preferences.d/synaptic_preferences
This creates a symlink in the 'general' apt preferences file to the preferences file that's used by Synaptic.
But this is separate from using 'apt-mark', so you won't find a list of pinned packages using 'apt-mark showhold'. You can find such list, obviously by looking in Synaptic, but also using

Code: Select all

apt policy
and at the end there will be a list of pinned packages.
To remove this symlink:

Code: Select all

sudo rm /etc/apt/preferences.d/synaptic_preferences
(originally posted at viewtopic.php?p=628377#p628377)

Return to “Tips & Tricks by users”