WIP: refactoring of https://wiki.debian.org/AptConf and other apt configuration pages


Apt is configured by several resources, including:

apt.conf

See man 5 apt.conf

Apt accepts configuration files (without extension) in /etc/apt/apt.conf.d/. These are processed by Apt in numeric/alphabetical order. /etc/apt/apt.conf is also valid but deprecated.

These files can contain various directives:

If you really have to use FTP, this sets the FTP proxy:

 Acquire::ftp
 {
   Proxy "ftp://proxy:2121/";
   ProxyLogin
   {
      "USER $(SITE_USER)@$(SITE)";
      "PASS $(SITE_PASS)";
   }
 }

apt_preferences

See man 5 apt_preferences

Apt pinning

When multiple Apt repositories are enabled, a package can be present in several of them. To know which one should be installed, Apt assigns priorities to packages. The default is 500.

Pinning allows changing priorities for only some packages/repositories, so that you can:

Command line options

PackageManagementTools such as apt, aptitude, apt-get... allow you to set specific configuration options for a single run. See their respective ?ManPages.