1APT.CONF(5)                                                        APT.CONF(5)
2
3
4

NAME

6       apt.conf - Configuration file for APT
7

DESCRIPTION

9       apt.conf is the main configuration file for the APT suite of tools, all
10       tools make use of the configuration file  and  a  common  command  line
11       parser  to provide a uniform environment. When an APT tool starts up it
12       will read the configuration specified  by  the  APT_CONFIG  environment
13       variable  (if any) and then read the files in Dir::Etc::Parts then read
14       the main configuration file specified by  Dir::Etc::main  then  finally
15       apply  the  command  line  options to override the configuration direc‐
16       tives, possibly loading even more config files.
17
18       The configuration file is organized in a tree  with  options  organized
19       into  functional  groups.  Option  specification is given with a double
20       colon notation, for instance APT::Get::Assume-Yes is an  option  within
21       the APT tool group, for the Get tool. Options do not inherit from their
22       parent groups.
23
24       Syntacticly the configuration language is modeled after  what  the  ISC
25       tools such as bind and dhcp use.  Lines starting with // are treated as
26       comments (ignored).  Each line is of the form
27
28       APT::Get::Assume-Yes "true";
29       The trailing semicolon is required and the quotes are optional.  A  new
30       scope can be opened with curly braces, like:
31
32       APT {
33         Get {
34           Assume-Yes "true";
35           Fix-Broken "true";
36         };
37       };
38       with  newlines placed to make it more readable. Lists can be created by
39       opening a scope and including a single word enclosed in quotes followed
40       by  a  semicolon. Multiple entries can be included, each separated by a
41       semicolon.
42
43       DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
44
45       In     general     the      sample      configuration      file      in
46       /usr/share/doc/apt-0.5.15lorg3.2/examples/apt.conf
47       /usr/share/doc/apt-0.5.15lorg3.2/examples/configure-index  is  a   good
48       guide for how it should look.
49
50       Two  specials  are allowed, #include and #clear.  #include will include
51       the given file, unless the filename ends in a  slash,  then  the  whole
52       directory is included.  #clear is used to erase a list of names.
53
54       All of the APT tools take a -o option which allows an arbitrary config‐
55       uration directive to be specified on the command line. The syntax is  a
56       full  option  name  (APT::Get::Assume-Yes  for instance) followed by an
57       equals sign then the new value of the option. Lists can be appended too
58       by adding a trailing :: to the list name.
59

THE APT GROUP

61       This  group of options controls general APT behavior as well as holding
62       the options for all of the tools.
63
64       Architecture
65              System Architecture; sets the architecture to use when  fetching
66              files  and  parsing  package  lists. The internal default is the
67              architecture apt was compiled for.
68
69       Ignore-Hold
70              Ignore Held packages; This  global  option  causes  the  problem
71              resolver to ignore held packages in its decision making.
72
73       Clean-Installed
74              Defaults to on. When turned on the autoclean feature will remove
75              any packages which can no longer be downloaded from  the  cache.
76              If  turned off then packages that are locally installed are also
77              excluded from cleaning - but note that APT  provides  no  direct
78              means to reinstall them.
79
80       Immediate-Configure
81              Disable  Immediate Configuration; This dangerous option disables
82              some of APT's ordering code to  cause  it  to  make  fewer  dpkg
83              calls.  Doing  so may be necessary on some extremely slow single
84              user systems but is very dangerous and may cause package install
85              scripts to fail or worse.  Use at your own risk.
86
87       Force-LoopBreak
88              Never  Enable  this option unless you -really- know what you are
89              doing. It permits APT to temporarily remove an essential package
90              to  break  a  Conflicts/Conflicts  or  Conflicts/Pre-Depend loop
91              between two essential packages. SUCH A LOOP SHOULD  NEVER  EXIST
92              AND IS A GRAVE BUG. This option will work if the essential pack‐
93              ages are not tar, gzip, libc, dpkg, bash or anything that  those
94              packages depend on.
95
96       Cache-Limit
97              APT  uses  a  fixed  size  memory mapped cache file to store the
98              'available' information. This sets the size of that cache.
99
100       Build-Essential
101              Defines which package(s) are considered essential  build  depen‐
102              dencies.
103
104       Get    The  Get subsection controls the apt-get(8) tool, please see its
105              documentation for more information about the options here.
106
107       Cache  The Cache subsection controls the apt-cache(8) tool, please  see
108              its documentation for more information about the options here.
109
110       CDROM  The  CDROM subsection controls the apt-cdrom(8) tool, please see
111              its documentation for more information about the options here.
112

THE ACQUIRE GROUP

114       The Acquire group of options controls the download of packages and  the
115       URI handlers.
116
117       Queue-Mode
118              Queuing  mode;  Queue-Mode  can  be  one of host or access which
119              determines how   APT  parallelizes  outgoing  connections.  host
120              means that one connection per target host will be opened, access
121              means that one connection per URI type will be opened.
122
123       Retries
124              Number of retries to perform. If this is non-zero APT will retry
125              failed files the given number of times.
126
127       Source-Symlinks
128              Use symlinks for source archives. If set to true then source ar‐
129              chives will be symlinked when possible instead of copying.  True
130              is the default
131
132       http   HTTP  URIs;  http::Proxy is the default http proxy to use. It is
133              in the standard form of http://[[user][:pass]@]host[:port]/. Per
134              host   proxies   can   also  be  specified  by  using  the  form
135              http::Proxy::<host> with the special keyword DIRECT  meaning  to
136              use  no  proxies. The http_proxy environment variable will over‐
137              ride all settings.
138
139              Three settings are provided for cache control with HTTP/1.1 com‐
140              pliant  proxy  caches.  No-Cache  tells the proxy to not use its
141              cached response under any circumstances, Max-Age  is  sent  only
142              for  index files and tells the cache to refresh its object if it
143              is older than the given number of seconds.  Debian  updates  its
144              index  files  daily  so the default is 1 day. No-Store specifies
145              that the cache should never store this request, it is  only  set
146              for  archive  files.  This  may be useful to prevent polluting a
147              proxy cache with very large .deb files. Note: Squid  2.0.2  does
148              not support any of these options.
149
150              The  option  timeout  sets the timeout timer used by the method,
151              this applies to all things including connection timeout and data
152              timeout.
153
154              One  setting  is provided to control the pipeline depth in cases
155              where the remote server is not RFC conforming or buggy (such  as
156              Squid 2.0.2) Acquire::http::Pipeline-Depth can be a value from 0
157              to 5 indicating how many outstanding requests APT should send. A
158              value  of  zero  MUST  be  specified if the remote host does not
159              properly linger on TCP connections - otherwise  data  corruption
160              will  occur.  Hosts  which  require this are in violation of RFC
161              2068.
162
163       ftp    FTP URIs; ftp::Proxy is the default proxy server to use.  It  is
164              in  the  standard form of ftp://[[user][:pass]@]host[:port]/ and
165              is overridden by the ftp_proxy environment variable.  To  use  a
166              ftp proxy you will have to set the ftp::ProxyLogin script in the
167              configuration file. This entry specifies the commands to send to
168              tell   the   proxy   server  what  to  connect  to.  Please  see
169              /usr/share/doc/apt-0.5.15lorg3.2/examples/configure-index for an
170              example  of  how to do this. The subsitution variables available
171              are $(PROXY_USER),  $(PROXY_PASS),  $(SITE_USER),  $(SITE_PASS),
172              $(SITE),  and  $(SITE_PORT).  Each is taken from it's respective
173              URI component.
174
175              The option timeout sets the timeout timer used  by  the  method,
176              this applies to all things including connection timeout and data
177              timeout.
178
179              Several settings are provided to control passive mode. Generally
180              it  is  safe  to leave passive mode on, it works in nearly every
181              environment.  However some situations require that passive  mode
182              be  disabled  and  port  mode ftp used instead. This can be done
183              globally, for connections that go through a proxy or for a  spe‐
184              cific host (See the sample config file for examples)
185
186              It  is  possible to proxy FTP over HTTP by setting the ftp_proxy
187              environment variable to a http url - see the discussion  of  the
188              http method above for syntax. You cannot set this in the config‐
189              uration file and it is not recommended to use FTP over HTTP  due
190              to its low efficiency.
191
192              The  setting  ForceExtended controls the use of RFC2428 EPSV and
193              EPRT commands. The defaut is false, which means  these  commands
194              are only used if the control connection is IPv6. Setting this to
195              true forces their use even on IPv4 connections. Note  that  most
196              FTP servers do not support RFC2428.
197
198       cdrom  CDROM  URIs; the only setting for CDROM URIs is the mount point,
199              cdrom::Mount which must be the mount point for the  CDROM  drive
200              as  specified in /etc/fstab. It is possible to provide alternate
201              mount and unmount commands if your mount point cannot be  listed
202              in  the fstab (such as an SMB mount and old mount packages). The
203              syntax is to put
204
205              "/cdrom/"::Mount "foo";
206              within the cdrom block. It is important  to  have  the  trailing
207              slash. Unmount commands can be specified using UMount.
208

DIRECTORIES

210       The  Dir::State  section  has  directories  that pertain to local state
211       information. lists is the directory to place downloaded  package  lists
212       in  and status is the name of the dpkg status file.  preferences is the
213       name of the APT preferences  file.   Dir::State  contains  the  default
214       directory to prefix on all sub items if they do not start with / or ./.
215
216       Dir::Cache  contains  locations  pertaining to local cache information,
217       such as the two package caches srcpkgcache and pkgcache as well as  the
218       location to place downloaded archives, Dir::Cache::archives. Generation
219       of caches can be turned off by setting their names to  be  blank.  This
220       will  slow down startup but save disk space. It is probably prefered to
221       turn off the pkgcache rather than the srcpkgcache. Like Dir::State  the
222       default directory is contained in Dir::Cache
223
224       Dir::Etc contains the location of configuration files, sourcelist gives
225       the location of the sourcelist and main is  the  default  configuration
226       file  (setting  has  no  effect, unless it is done from the config file
227       specified by APT_CONFIG).
228
229       The Dir::Parts setting reads in all the  config  fragments  in  lexical
230       order  from  the  directory specified. After this is done then the main
231       config file is loaded.
232
233       Binary programs are pointed to by Dir::Bin. Dir::Bin::Methods specifies
234       the  location  of  the  method  handlers and gzip, dpkg, apt-get, dpkg-
235       source, dpkg-buildpackage and apt-cache specify  the  location  of  the
236       respective programs.
237

APT IN DSELECT

239       When  APT  is  used as a dselect(8) method several configuration direc‐
240       tives control the default behaviour. These are in the DSelect section.
241
242       Clean  Cache Clean mode; this value may be one of always, prompt, auto,
243              pre-auto  and never.  always and prompt will remove all packages
244              from the cache after upgrading, prompt  (the  default)  does  so
245              conditionally.   auto  removes  only those packages which are no
246              longer downloadable (replaced with a new version for  instance).
247              pre-auto performs this action before downloading new packages.
248
249       Options
250              The contents of this variable is passed to apt-get(8) as command
251              line options when it is run for the install phase.
252
253       UpdateOptions
254              The contents of this variable is passed to apt-get(8) as command
255              line options when it is run for the update phase.
256
257       PromptAfterUpdate
258              If  true the [U]pdate operation in dselect(8) will always prompt
259              to continue.  The default is to prompt only on error.
260

HOW APT CALLS DPKG

262       Several configuration directives control how APT invokes dpkg(8). These
263       are in the DPkg section.
264
265       Options
266              This  is  a list of options to pass to dpkg. The options must be
267              specified using the list notation and each list item  is  passed
268              as a single argument to dpkg(8).
269
270       Pre-Invoke
271
272       Post-Invoke
273              This  is  a  list of shell commands to run before/after invoking
274              dpkg(8).  Like Options this must be specified in list  notation.
275              The commands are invoked in order using /bin/sh, should any fail
276              APT will abort.
277
278       Pre-Install-Pkgs
279              This is a list of shell commands to run  before  invoking  dpkg.
280              Like  Options  this must be specified in list notation. The com‐
281              mands are invoked in order using /bin/sh, should  any  fail  APT
282              will  abort. APT will pass to the commands on standard input the
283              filenames of all .deb files it is  going  to  install,  one  per
284              line.
285
286              Version 2 of this protocol dumps more information, including the
287              protocol version, the APT configuration space and the  packages,
288              files  and  versions being changed. Version 2 is enabled by set‐
289              ting DPkg::Tools::Options::cmd::Version to 2. cmd is  a  command
290              given to Pre-Install-Pkgs.
291
292       Run-Directory
293              APT  chdirs  to this directory before invoking dpkg, the default
294              is /.
295
296       Build-Options
297              These options are passed to dpkg-buildpackage(1) when  compiling
298              packages,  the  default  is  to  disable signing and produce all
299              binaries.
300

DEBUG OPTIONS

302       Most of the options in the debug section are  not  interesting  to  the
303       normal user, however Debug::pkgProblemResolver shows interesting output
304       about the decisions dist-upgrade makes.  Debug::NoLocking disables file
305       locking  so APT can do some operations as non-root and Debug::pkgDPkgPM
306       will  print  out  the  command   line   for   each   dpkg   invokation.
307       Debug::IdentCdrom  will  disable  the inclusion of statfs data in CDROM
308       IDs.
309

EXAMPLES

311       /usr/share/doc/apt-0.5.15lorg3.2/examples/configure-index  contains   a
312       sample  configuration  file showing the default values for all possible
313       options.
314

FILES

316       /etc/apt/apt.conf
317

SEE ALSO

319       apt-cache(8), apt-config(8), apt_preferences(5).
320

BUGS

322       See the APT bug page <URL:http://bugs.debian.org/src:apt>.  If you wish
323       to  report  a  bug in APT, please see /usr/share/doc/debian/bug-report‐
324       ing.txt or the reportbug(1) command.
325

AUTHOR

327       APT was written by the APT team <apt@packages.debian.org>.
328
329
330
331                                02 August 2007                     APT.CONF(5)
Impressum