''apt-cache policy <packagename>'' provides information about the selection process of the package versions to be installed.
The output includes the version that is currently installed, the one of a possible update candidate and whether a package version is pinned. It displays a version table with the priorities of package sources as well as those of individual packages.
The priority in front of each package (500 or 100 in the example above) is the priority advertised by the package in that repository or location. The number at the end (namely 991) is the actual pin priority being placed on the package. This is like a critical threshold that has to be surpassed for a package to be considered a candidate for installation.
===== Package pinning =====
In specific cases it may be required to force a certain version of a package and prevent the installation of any upgrades. This can for instance be achieved through package pinning in //apt//. In practice this boils down to creating a config file in ''/etc/apt/preferences.d/'' with a regexp to match the package names, which version to pin and the priority.