Introduction to Apt Pinning
I’ve seen this go wrong when working with mixed-distro environments - managing package dependencies can become a complex task. Apt pinning is a feature in Debian-based systems that allows you to control the package versions installed on your system. This is particularly useful when you need to ensure that specific packages are installed from a particular repository or at a specific version.
Understanding Apt Pinning
The real trick is to understand how apt pinning works. It assigns a priority to each package version, and the package with the highest priority is the one that will be installed. You can set priorities using the /etc/apt/preferences file or by creating a new file in the /etc/apt/preferences.d/ directory. Don’t bother with creating a new file unless you have a lot of packages to pin - the /etc/apt/preferences file is usually sufficient.