I put jessie-backports in my /etc/apt/sources.list
, but it seems that apt will not automatically use the packages from backports but older packages.
However, if I use apt-cache show
to check the version it shows the latest, and I am able to use apt install xxx=<latest-version>
to install it.
How to tell apt always use the latest package by default?
Best Answer
As @cutrightjm has mentioned
apt-pinning
is the solution.If you create a file
/etc/apt/preferences.d/backports
with the following contentapt
will always install packages fromstretch-backports
, except when you pin another package source with a priority higher than 800.If you want to see all available versions of a package, their priority and which one will be installed, you can use
apt-cache policy <packagename>
.