# How to set default APT resource

Running cat /etc/apt/apt.conf offers:

APT::Default-Release "stable";


I assumed doing that would certainly forbid the command apt-get install wajig to function, if a more recent variation was readily available anywhere yet Stable .

Just how do I set up APT to make sure that such a variation would certainly need me to define the repository name in order to install it (as an example apt-get --target-release testing wajig)?

[ upgrade ] I had not been mindful that my inquiry had not been so clear. I desire this to be an archive - vast setup (i.e. it need to relate to each plan in the Stable archive), not to some details plan.

0
2019-05-18 22:44:09
Source Share

Put this in your" / etc/apt/preferences ":

Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin: release o=Debian
Pin-Priority: -10


This is from man apt_preferences where P suggests Pin-Priority:

500 < P <=990
causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent

P < 0
prevents the version from being installed


See this Debian wiki page for something gentler than the manpage.

0
2019-05-21 16:51:00
Source

If there is a wajig plan with a favorable pin priority in any one of your resources, apt-get install wajig will certainly install it. Default-Release functions like establishing a high top priority to that certain release. If I recognize appropriately, you would certainly such as apt-get install wajig to function if press has the most up to date variation and also not to function or else ; I do not assume that is feasible.

0
2019-05-21 07:00:40
Source