]> git.saurik.com Git - apt.git/blame - doc/apt.conf.5.xml
* French manpage translation update
[apt.git] / doc / apt.conf.5.xml
CommitLineData
24f6490f
AL
1<?xml version="1.0" encoding="utf-8" standalone="no"?>
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4
5<!ENTITY % aptent SYSTEM "apt.ent">
6%aptent;
7
8]>
9
10<refentry>
5e80de29
AL
11
12 <refentryinfo>
13 &apt-author.jgunthorpe;
14 &apt-author.team;
be1b8568
EL
15 <author>
16 <firstname>Daniel</firstname>
17 <surname>Burrows</surname>
18 <contrib>Initial documentation of Debug::*.</contrib>
19 <email>dburrows@debian.org</email>
20 </author>
5e80de29
AL
21 &apt-email;
22 &apt-product;
23 <!-- The last update date -->
d5081aee 24 <date>18 September 2009</date>
5e80de29 25 </refentryinfo>
24f6490f
AL
26
27 <refmeta>
28 <refentrytitle>apt.conf</refentrytitle>
29 <manvolnum>5</manvolnum>
f0599b9c 30 <refmiscinfo class="manual">APT</refmiscinfo>
24f6490f
AL
31 </refmeta>
32
33 <!-- Man page title -->
34 <refnamediv>
35 <refname>apt.conf</refname>
36 <refpurpose>Configuration file for APT</refpurpose>
37 </refnamediv>
38
39 <refsect1><title>Description</title>
40 <para><filename>apt.conf</filename> is the main configuration file for the APT suite of
41 tools, all tools make use of the configuration file and a common command line
42 parser to provide a uniform environment. When an APT tool starts up it will
43 read the configuration specified by the <envar>APT_CONFIG</envar> environment
44 variable (if any) and then read the files in <literal>Dir::Etc::Parts</literal>
45 then read the main configuration file specified by
46 <literal>Dir::Etc::main</literal> then finally apply the
47 command line options to override the configuration directives, possibly
48 loading even more config files.</para>
49
50 <para>The configuration file is organized in a tree with options organized into
5f4331c4 51 functional groups. Option specification is given with a double colon
24f6490f 52 notation, for instance <literal>APT::Get::Assume-Yes</literal> is an option within
5f4331c4 53 the APT tool group, for the Get tool. Options do not inherit from their
24f6490f
AL
54 parent groups.</para>
55
e3a1f08d 56 <para>Syntactically the configuration language is modeled after what the ISC tools
7f1bc985
EL
57 such as bind and dhcp use. Lines starting with
58 <literal>//</literal> are treated as comments (ignored), as well as all text
59 between <literal>/*</literal> and <literal>*/</literal>, just like C/C++ comments.
24f6490f 60 Each line is of the form
5f4331c4 61 <literal>APT::Get::Assume-Yes "true";</literal>. The trailing
52f2e1da
JAK
62 semicolon and the quotes are required. The value must be on one line, and
63 there is no kind of string concatenation. It must not include inside quotes.
64 The behavior of the backslash "\" and escaped characters inside a value is
31f113db
JAK
65 undefined and it should not be used. An option name may include
66 alphanumerical characters and the "/-:._+" characters. A new scope can
67 be opened with curly braces, like:</para>
24f6490f
AL
68
69<informalexample><programlisting>
70APT {
71 Get {
72 Assume-Yes "true";
73 Fix-Broken "true";
74 };
75};
76</programlisting></informalexample>
77
78 <para>with newlines placed to make it more readable. Lists can be created by
d82cdf73 79 opening a scope and including a single string enclosed in quotes followed by a
24f6490f
AL
80 semicolon. Multiple entries can be included, each separated by a semicolon.</para>
81
82<informalexample><programlisting>
83DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
84</programlisting></informalexample>
85
86 <para>In general the sample configuration file in
87 <filename>&docdir;examples/apt.conf</filename> &configureindex;
88 is a good guide for how it should look.</para>
89
fb3b7ef0
LB
90 <para>The names of the configuration items are not case-sensitive. So in the previous example
91 you could use <literal>dpkg::pre-install-pkgs</literal>.</para>
92
63fc5550
DK
93 <para>Names for the configuration items are optional if a list is defined as it can be see in
94 the <literal>DPkg::Pre-Install-Pkgs</literal> example above. If you don't specify a name a
95 new entry will simply add a new option to the list. If you specify a name you can override
96 the option as every other option by reassigning a new value to the option.</para>
97
334459ab
JAK
98 <para>Two specials are allowed, <literal>#include</literal> (which is deprecated
99 and not supported by alternative implementations) and <literal>#clear</literal>:
24f6490f
AL
100 <literal>#include</literal> will include the given file, unless the filename
101 ends in a slash, then the whole directory is included.
d82cdf73 102 <literal>#clear</literal> is used to erase a part of the configuration tree. The
63fc5550
DK
103 specified element and all its descendants are erased.
104 (Note that these lines also need to end with a semicolon.)</para>
105
106 <para>The #clear command is the only way to delete a list or a complete scope.
107 Reopening a scope or the ::-style described below will <emphasis>not</emphasis>
a9564741 108 override previously written entries. Only options can be overridden by addressing a new
63fc5550 109 value to it - lists and scopes can't be overridden, only cleared.</para>
24f6490f
AL
110
111 <para>All of the APT tools take a -o option which allows an arbitrary configuration
112 directive to be specified on the command line. The syntax is a full option
113 name (<literal>APT::Get::Assume-Yes</literal> for instance) followed by an equals
114 sign then the new value of the option. Lists can be appended too by adding
63fc5550 115 a trailing :: to the list name. (As you might suspect: The scope syntax can't be used
a9564741 116 on the command line.)</para>
63fc5550
DK
117
118 <para>Note that you can use :: only for appending one item per line to a list and
119 that you should not use it in combination with the scope syntax.
120 (The scope syntax implicit insert ::) Using both syntaxes together will trigger a bug
121 which some users unfortunately relay on: An option with the unusual name "<literal>::</literal>"
122 which acts like every other option with a name. These introduces many problems
123 including that a user who writes multiple lines in this <emphasis>wrong</emphasis> syntax in
124 the hope to append to a list will gain the opposite as only the last assignment for this option
125 "<literal>::</literal>" will be used. Upcoming APT versions will raise errors and
126 will stop working if they encounter this misuse, so please correct such statements now
127 as long as APT doesn't complain explicit about them.</para>
24f6490f
AL
128 </refsect1>
129
130 <refsect1><title>The APT Group</title>
131 <para>This group of options controls general APT behavior as well as holding the
132 options for all of the tools.</para>
133
134 <variablelist>
135 <varlistentry><term>Architecture</term>
136 <listitem><para>System Architecture; sets the architecture to use when fetching files and
137 parsing package lists. The internal default is the architecture apt was
138 compiled for.</para></listitem>
139 </varlistentry>
140
60a8f9c0
EL
141 <varlistentry><term>Default-Release</term>
142 <listitem><para>Default release to install packages from if more than one
efc487fb 143 version available. Contains release name, codename or release version. Examples: 'stable', 'testing', 'unstable', 'lenny', 'squeeze', '4.0', '5.0*'. See also &apt-preferences;.</para></listitem>
60a8f9c0
EL
144 </varlistentry>
145
24f6490f
AL
146 <varlistentry><term>Ignore-Hold</term>
147 <listitem><para>Ignore Held packages; This global option causes the problem resolver to
148 ignore held packages in its decision making.</para></listitem>
149 </varlistentry>
150
151 <varlistentry><term>Clean-Installed</term>
152 <listitem><para>Defaults to on. When turned on the autoclean feature will remove any packages
153 which can no longer be downloaded from the cache. If turned off then
154 packages that are locally installed are also excluded from cleaning - but
155 note that APT provides no direct means to reinstall them.</para></listitem>
156 </varlistentry>
157
158 <varlistentry><term>Immediate-Configure</term>
f66a64c2
DK
159 <listitem><para>Defaults to on which will cause APT to install essential and important packages
160 as fast as possible in the install/upgrade operation. This is done to limit the effect of a failing
20382bad 161 &dpkg; call: If this option is disabled APT does treat an important package in the same way as
f66a64c2
DK
162 an extra package: Between the unpacking of the important package A and his configuration can then
163 be many other unpack or configuration calls, e.g. for package B which has no relation to A, but
164 causes the dpkg call to fail (e.g. because maintainer script of package B generates an error) which results
165 in a system state in which package A is unpacked but unconfigured - each package depending on A is now no
166 longer guaranteed to work as their dependency on A is not longer satisfied. The immediate configuration marker
167 is also applied to all dependencies which can generate a problem if the dependencies e.g. form a circle
168 as a dependency with the immediate flag is comparable with a Pre-Dependency. So in theory it is possible
46e39c8e
MV
169 that APT encounters a situation in which it is unable to perform immediate configuration, errors out and
170 refers to this option so the user can deactivate the immediate configuration temporarily to be able to perform
f66a64c2 171 an install/upgrade again. Note the use of the word "theory" here as this problem was only encountered by now
46e39c8e 172 in real world a few times in non-stable distribution versions and was caused by wrong dependencies of the package
20382bad
DK
173 in question or by a system in an already broken state, so you should not blindly disable this option as
174 the mentioned scenario above is not the only problem immediate configuration can help to prevent in the first place.
175 Before a big operation like <literal>dist-upgrade</literal> is run with this option disabled it should be tried to
176 explicitly <literal>install</literal> the package APT is unable to configure immediately, but please make sure to
177 report your problem also to your distribution and to the APT team with the buglink below so they can work on
178 improving or correcting the upgrade process.</para></listitem>
24f6490f
AL
179 </varlistentry>
180
181 <varlistentry><term>Force-LoopBreak</term>
182 <listitem><para>Never Enable this option unless you -really- know what you are doing. It
183 permits APT to temporarily remove an essential package to break a
184 Conflicts/Conflicts or Conflicts/Pre-Depend loop between two essential
185 packages. SUCH A LOOP SHOULD NEVER EXIST AND IS A GRAVE BUG. This option
186 will work if the essential packages are not tar, gzip, libc, dpkg, bash or
187 anything that those packages depend on.</para></listitem>
188 </varlistentry>
189
190 <varlistentry><term>Cache-Limit</term>
191 <listitem><para>APT uses a fixed size memory mapped cache file to store the 'available'
a04c23d7 192 information. This sets the size of that cache (in bytes).</para></listitem>
24f6490f
AL
193 </varlistentry>
194
195 <varlistentry><term>Build-Essential</term>
196 <listitem><para>Defines which package(s) are considered essential build dependencies.</para></listitem>
197 </varlistentry>
198
199 <varlistentry><term>Get</term>
200 <listitem><para>The Get subsection controls the &apt-get; tool, please see its
201 documentation for more information about the options here.</para></listitem>
202 </varlistentry>
203
204 <varlistentry><term>Cache</term>
205 <listitem><para>The Cache subsection controls the &apt-cache; tool, please see its
206 documentation for more information about the options here.</para></listitem>
207 </varlistentry>
208
209 <varlistentry><term>CDROM</term>
210 <listitem><para>The CDROM subsection controls the &apt-cdrom; tool, please see its
211 documentation for more information about the options here.</para></listitem>
212 </varlistentry>
213 </variablelist>
214 </refsect1>
215
216 <refsect1><title>The Acquire Group</title>
217 <para>The <literal>Acquire</literal> group of options controls the download of packages
218 and the URI handlers.
219
220 <variablelist>
0d70b055 221 <varlistentry><term>PDiffs</term>
d82cdf73 222 <listitem><para>Try to download deltas called <literal>PDiffs</literal> for
0d70b055 223 Packages or Sources files instead of downloading whole ones. True
46e39c8e
MV
224 by default.</para>
225 <para>Two sub-options to limit the use of PDiffs are also available:
226 With <literal>FileLimit</literal> can be specified how many PDiff files
227 are downloaded at most to patch a file. <literal>SizeLimit</literal>
228 on the other hand is the maximum precentage of the size of all patches
229 compared to the size of the targeted file. If one of these limits is
230 exceeded the complete file is downloaded instead of the patches.
231 </para></listitem>
0d70b055
EL
232 </varlistentry>
233
24f6490f
AL
234 <varlistentry><term>Queue-Mode</term>
235 <listitem><para>Queuing mode; <literal>Queue-Mode</literal> can be one of <literal>host</literal> or
236 <literal>access</literal> which determines how APT parallelizes outgoing
237 connections. <literal>host</literal> means that one connection per target host
238 will be opened, <literal>access</literal> means that one connection per URI type
239 will be opened.</para></listitem>
240 </varlistentry>
241
242 <varlistentry><term>Retries</term>
243 <listitem><para>Number of retries to perform. If this is non-zero APT will retry failed
244 files the given number of times.</para></listitem>
245 </varlistentry>
246
247 <varlistentry><term>Source-Symlinks</term>
248 <listitem><para>Use symlinks for source archives. If set to true then source archives will
249 be symlinked when possible instead of copying. True is the default.</para></listitem>
250 </varlistentry>
251
252 <varlistentry><term>http</term>
253 <listitem><para>HTTP URIs; http::Proxy is the default http proxy to use. It is in the
254 standard form of <literal>http://[[user][:pass]@]host[:port]/</literal>. Per
255 host proxies can also be specified by using the form
256 <literal>http::Proxy::&lt;host&gt;</literal> with the special keyword <literal>DIRECT</literal>
788a8f42
EL
257 meaning to use no proxies. If no one of the above settings is specified,
258 <envar>http_proxy</envar> environment variable
259 will be used.</para>
24f6490f
AL
260
261 <para>Three settings are provided for cache control with HTTP/1.1 compliant
262 proxy caches. <literal>No-Cache</literal> tells the proxy to not use its cached
263 response under any circumstances, <literal>Max-Age</literal> is sent only for
264 index files and tells the cache to refresh its object if it is older than
265 the given number of seconds. Debian updates its index files daily so the
266 default is 1 day. <literal>No-Store</literal> specifies that the cache should never
267 store this request, it is only set for archive files. This may be useful
268 to prevent polluting a proxy cache with very large .deb files. Note:
269 Squid 2.0.2 does not support any of these options.</para>
270
271 <para>The option <literal>timeout</literal> sets the timeout timer used by the method,
272 this applies to all things including connection timeout and data timeout.</para>
273
274 <para>One setting is provided to control the pipeline depth in cases where the
5f4331c4 275 remote server is not RFC conforming or buggy (such as Squid 2.0.2).
24f6490f
AL
276 <literal>Acquire::http::Pipeline-Depth</literal> can be a value from 0 to 5
277 indicating how many outstanding requests APT should send. A value of
278 zero MUST be specified if the remote host does not properly linger
279 on TCP connections - otherwise data corruption will occur. Hosts which
5900bd8d
DK
280 require this are in violation of RFC 2068.</para>
281
282 <para>The used bandwidth can be limited with <literal>Acquire::http::Dl-Limit</literal>
283 which accepts integer values in kilobyte. The default value is 0 which deactivates
a9564741 284 the limit and tries uses as much as possible of the bandwidth (Note that this option implicit
9f542bae
DK
285 deactivates the download from multiple servers at the same time.)</para>
286
287 <para><literal>Acquire::http::User-Agent</literal> can be used to set a different
288 User-Agent for the http download method as some proxies allow access for clients
289 only if the client uses a known identifier.</para>
290 </listitem>
24f6490f
AL
291 </varlistentry>
292
370ad5e1 293 <varlistentry><term>https</term>
b9e9a44b
DK
294 <listitem><para>HTTPS URIs. Cache-control, Timeout, AllowRedirect, Dl-Limit and
295 proxy options are the same as for <literal>http</literal> method and will also
296 default to the options from the <literal>http</literal> method if they are not
297 explicitly set for https. <literal>Pipeline-Depth</literal> option is not
298 supported yet.</para>
370ad5e1
EL
299
300 <para><literal>CaInfo</literal> suboption specifies place of file that
301 holds info about trusted certificates.
302 <literal>&lt;host&gt;::CaInfo</literal> is corresponding per-host option.
303 <literal>Verify-Peer</literal> boolean suboption determines whether verify
304 server's host certificate against trusted certificates or not.
305 <literal>&lt;host&gt;::Verify-Peer</literal> is corresponding per-host option.
306 <literal>Verify-Host</literal> boolean suboption determines whether verify
307 server's hostname or not.
308 <literal>&lt;host&gt;::Verify-Host</literal> is corresponding per-host option.
309 <literal>SslCert</literal> determines what certificate to use for client
310 authentication. <literal>&lt;host&gt;::SslCert</literal> is corresponding per-host option.
311 <literal>SslKey</literal> determines what private key to use for client
312 authentication. <literal>&lt;host&gt;::SslKey</literal> is corresponding per-host option.
313 <literal>SslForceVersion</literal> overrides default SSL version to use.
314 Can contain 'TLSv1' or 'SSLv3' string.
315 <literal>&lt;host&gt;::SslForceVersion</literal> is corresponding per-host option.
316 </para></listitem></varlistentry>
317
24f6490f 318 <varlistentry><term>ftp</term>
788a8f42
EL
319 <listitem><para>FTP URIs; ftp::Proxy is the default ftp proxy to use. It is in the
320 standard form of <literal>ftp://[[user][:pass]@]host[:port]/</literal>. Per
321 host proxies can also be specified by using the form
322 <literal>ftp::Proxy::&lt;host&gt;</literal> with the special keyword <literal>DIRECT</literal>
323 meaning to use no proxies. If no one of the above settings is specified,
324 <envar>ftp_proxy</envar> environment variable
325 will be used. To use a ftp
24f6490f
AL
326 proxy you will have to set the <literal>ftp::ProxyLogin</literal> script in the
327 configuration file. This entry specifies the commands to send to tell
328 the proxy server what to connect to. Please see
329 &configureindex; for an example of
e3a1f08d 330 how to do this. The substitution variables available are
24f6490f
AL
331 <literal>$(PROXY_USER)</literal> <literal>$(PROXY_PASS)</literal> <literal>$(SITE_USER)</literal>
332 <literal>$(SITE_PASS)</literal> <literal>$(SITE)</literal> and <literal>$(SITE_PORT)</literal>
333 Each is taken from it's respective URI component.</para>
334
335 <para>The option <literal>timeout</literal> sets the timeout timer used by the method,
336 this applies to all things including connection timeout and data timeout.</para>
337
338 <para>Several settings are provided to control passive mode. Generally it is
339 safe to leave passive mode on, it works in nearly every environment.
340 However some situations require that passive mode be disabled and port
341 mode ftp used instead. This can be done globally, for connections that
342 go through a proxy or for a specific host (See the sample config file
343 for examples).</para>
344
345 <para>It is possible to proxy FTP over HTTP by setting the <envar>ftp_proxy</envar>
346 environment variable to a http url - see the discussion of the http method
347 above for syntax. You cannot set this in the configuration file and it is
348 not recommended to use FTP over HTTP due to its low efficiency.</para>
349
350 <para>The setting <literal>ForceExtended</literal> controls the use of RFC2428
e3a1f08d 351 <literal>EPSV</literal> and <literal>EPRT</literal> commands. The default is false, which means
24f6490f
AL
352 these commands are only used if the control connection is IPv6. Setting this
353 to true forces their use even on IPv4 connections. Note that most FTP servers
354 do not support RFC2428.</para></listitem>
355 </varlistentry>
356
357 <varlistentry><term>cdrom</term>
358 <listitem><para>CDROM URIs; the only setting for CDROM URIs is the mount point,
359 <literal>cdrom::Mount</literal> which must be the mount point for the CDROM drive
360 as specified in <filename>/etc/fstab</filename>. It is possible to provide
361 alternate mount and unmount commands if your mount point cannot be listed
362 in the fstab (such as an SMB mount and old mount packages). The syntax
31f113db 363 is to put <literallayout>/cdrom/::Mount "foo";</literallayout> within
24f6490f
AL
364 the cdrom block. It is important to have the trailing slash. Unmount
365 commands can be specified using UMount.</para></listitem>
366 </varlistentry>
8a3642bd
MV
367
368 <varlistentry><term>gpgv</term>
369 <listitem><para>GPGV URIs; the only option for GPGV URIs is the option to pass additional parameters to gpgv.
370 <literal>gpgv::Options</literal> Additional options passed to gpgv.
371 </para></listitem>
372 </varlistentry>
373
e85b4cd5
DK
374 <varlistentry><term>CompressionTypes</term>
375 <listitem><para>List of compression types which are understood by the acquire methods.
376 Files like <filename>Packages</filename> can be available in various compression formats.
8bd02d8b
DK
377 Per default the acquire methods can decompress <command>bzip2</command>, <command>lzma</command>
378 and <command>gzip</command> compressed files, with this setting more formats can be added
379 on the fly or the used method can be changed. The syntax for this is:
e85b4cd5 380 <synopsis>Acquire::CompressionTypes::<replaceable>FileExtension</replaceable> "<replaceable>Methodname</replaceable>";</synopsis>
8bd02d8b
DK
381 </para><para>Also the <literal>Order</literal> subgroup can be used to define in which order
382 the acquire system will try to download the compressed files. The acquire system will try the first
383 and proceed with the next compression type in this list on error, so to prefer one over the other type
384 simple add the preferred type at first - not already added default types will be added at run time
385 to the end of the list, so e.g. <synopsis>Acquire::CompressionTypes::Order:: "gz";</synopsis> can
386 be used to prefer <command>gzip</command> compressed files over <command>bzip2</command> and <command>lzma</command>.
387 If <command>lzma</command> should be preferred over <command>gzip</command> and <command>bzip2</command> the
388 configure setting should look like this <synopsis>Acquire::CompressionTypes::Order { "lzma"; "gz"; };</synopsis>
389 It is not needed to add <literal>bz2</literal> explicit to the list as it will be added automatic.</para>
390 <para>Note that at run time the <literal>Dir::Bin::<replaceable>Methodname</replaceable></literal> will
e85b4cd5 391 be checked: If this setting exists the method will only be used if this file exists, e.g. for
8bd02d8b 392 the bzip2 method (the inbuilt) setting is <literallayout>Dir::Bin::bzip2 "/bin/bzip2";</literallayout>
a9564741 393 Note also that list entries specified on the command line will be added at the end of the list
8bd02d8b
DK
394 specified in the configuration files, but before the default entries. To prefer a type in this case
395 over the ones specified in in the configuration files you can set the option direct - not in list style.
396 This will not override the defined list, it will only prefix the list with this type.</para>
397 <para>While it is possible to add an empty compression type to the order list, but APT in its current
398 version doesn't understand it correctly and will display many warnings about not downloaded files -
399 these warnings are most of the time false negatives. Future versions will maybe include a way to
400 really prefer uncompressed files to support the usage of local mirrors.</para></listitem>
e85b4cd5 401 </varlistentry>
24f6490f
AL
402 </variablelist>
403 </para>
404 </refsect1>
405
406 <refsect1><title>Directories</title>
407
408 <para>The <literal>Dir::State</literal> section has directories that pertain to local
409 state information. <literal>lists</literal> is the directory to place downloaded
410 package lists in and <literal>status</literal> is the name of the dpkg status file.
411 <literal>preferences</literal> is the name of the APT preferences file.
412 <literal>Dir::State</literal> contains the default directory to prefix on all sub
413 items if they do not start with <filename>/</filename> or <filename>./</filename>.</para>
414
415 <para><literal>Dir::Cache</literal> contains locations pertaining to local cache
416 information, such as the two package caches <literal>srcpkgcache</literal> and
417 <literal>pkgcache</literal> as well as the location to place downloaded archives,
418 <literal>Dir::Cache::archives</literal>. Generation of caches can be turned off
419 by setting their names to be blank. This will slow down startup but
e3a1f08d 420 save disk space. It is probably preferred to turn off the pkgcache rather
24f6490f
AL
421 than the srcpkgcache. Like <literal>Dir::State</literal> the default
422 directory is contained in <literal>Dir::Cache</literal></para>
423
424 <para><literal>Dir::Etc</literal> contains the location of configuration files,
425 <literal>sourcelist</literal> gives the location of the sourcelist and
426 <literal>main</literal> is the default configuration file (setting has no effect,
427 unless it is done from the config file specified by
13e8426f 428 <envar>APT_CONFIG</envar>).</para>
24f6490f
AL
429
430 <para>The <literal>Dir::Parts</literal> setting reads in all the config fragments in
431 lexical order from the directory specified. After this is done then the
432 main config file is loaded.</para>
433
434 <para>Binary programs are pointed to by <literal>Dir::Bin</literal>. <literal>Dir::Bin::Methods</literal>
435 specifies the location of the method handlers and <literal>gzip</literal>,
e85b4cd5 436 <literal>bzip2</literal>, <literal>lzma</literal>,
24f6490f
AL
437 <literal>dpkg</literal>, <literal>apt-get</literal> <literal>dpkg-source</literal>
438 <literal>dpkg-buildpackage</literal> and <literal>apt-cache</literal> specify the location
439 of the respective programs.</para>
db2cca11
OS
440
441 <para>
442 The configuration item <literal>RootDir</literal> has a special
443 meaning. If set, all paths in <literal>Dir::</literal> will be
444 relative to <literal>RootDir</literal>, <emphasis>even paths that
445 are specified absolutely</emphasis>. So, for instance, if
446 <literal>RootDir</literal> is set to
447 <filename>/tmp/staging</filename> and
448 <literal>Dir::State::status</literal> is set to
449 <filename>/var/lib/dpkg/status</filename>, then the status file
450 will be looked up in
451 <filename>/tmp/staging/var/lib/dpkg/status</filename>.
452 </para>
24f6490f
AL
453 </refsect1>
454
455 <refsect1><title>APT in DSelect</title>
456 <para>
457 When APT is used as a &dselect; method several configuration directives
458 control the default behaviour. These are in the <literal>DSelect</literal> section.</para>
459
460 <variablelist>
461 <varlistentry><term>Clean</term>
462 <listitem><para>Cache Clean mode; this value may be one of always, prompt, auto,
463 pre-auto and never. always and prompt will remove all packages from
464 the cache after upgrading, prompt (the default) does so conditionally.
465 auto removes only those packages which are no longer downloadable
466 (replaced with a new version for instance). pre-auto performs this
467 action before downloading new packages.</para></listitem>
468 </varlistentry>
469
470 <varlistentry><term>options</term>
471 <listitem><para>The contents of this variable is passed to &apt-get; as command line
472 options when it is run for the install phase.</para></listitem>
473 </varlistentry>
474
475 <varlistentry><term>Updateoptions</term>
476 <listitem><para>The contents of this variable is passed to &apt-get; as command line
477 options when it is run for the update phase.</para></listitem>
478 </varlistentry>
479
480 <varlistentry><term>PromptAfterUpdate</term>
481 <listitem><para>If true the [U]pdate operation in &dselect; will always prompt to continue.
482 The default is to prompt only on error.</para></listitem>
483 </varlistentry>
484 </variablelist>
485 </refsect1>
486
487 <refsect1><title>How APT calls dpkg</title>
488 <para>Several configuration directives control how APT invokes &dpkg;. These are
489 in the <literal>DPkg</literal> section.</para>
490
491 <variablelist>
492 <varlistentry><term>options</term>
493 <listitem><para>This is a list of options to pass to dpkg. The options must be specified
494 using the list notation and each list item is passed as a single argument
495 to &dpkg;.</para></listitem>
496 </varlistentry>
497
498 <varlistentry><term>Pre-Invoke</term><term>Post-Invoke</term>
499 <listitem><para>This is a list of shell commands to run before/after invoking &dpkg;.
500 Like <literal>options</literal> this must be specified in list notation. The
501 commands are invoked in order using <filename>/bin/sh</filename>, should any
502 fail APT will abort.</para></listitem>
503 </varlistentry>
504
505 <varlistentry><term>Pre-Install-Pkgs</term>
506 <listitem><para>This is a list of shell commands to run before invoking dpkg. Like
507 <literal>options</literal> this must be specified in list notation. The commands
508 are invoked in order using <filename>/bin/sh</filename>, should any fail APT
509 will abort. APT will pass to the commands on standard input the
510 filenames of all .deb files it is going to install, one per line.</para>
511
512 <para>Version 2 of this protocol dumps more information, including the
513 protocol version, the APT configuration space and the packages, files
514 and versions being changed. Version 2 is enabled by setting
515 <literal>DPkg::Tools::options::cmd::Version</literal> to 2. <literal>cmd</literal> is a
516 command given to <literal>Pre-Install-Pkgs</literal>.</para></listitem>
517 </varlistentry>
518
519 <varlistentry><term>Run-Directory</term>
520 <listitem><para>APT chdirs to this directory before invoking dpkg, the default is
521 <filename>/</filename>.</para></listitem>
522 </varlistentry>
523
524 <varlistentry><term>Build-options</term>
525 <listitem><para>These options are passed to &dpkg-buildpackage; when compiling packages,
526 the default is to disable signing and produce all binaries.</para></listitem>
527 </varlistentry>
528 </variablelist>
3e9c4f70 529
5e312de7 530 <refsect2><title>dpkg trigger usage (and related options)</title>
3e9c4f70
DK
531 <para>APT can call dpkg in a way so it can make aggressive use of triggers over
532 multiply calls of dpkg. Without further options dpkg will use triggers only in between his
5e312de7 533 own run. Activating these options can therefore decrease the time needed to perform the
3e9c4f70 534 install / upgrade. Note that it is intended to activate these options per default in the
a9564741 535 future, but as it changes the way APT calling dpkg drastically it needs a lot more testing.
3e9c4f70
DK
536 <emphasis>These options are therefore currently experimental and should not be used in
537 productive environments.</emphasis> Also it breaks the progress reporting so all frontends will
538 currently stay around half (or more) of the time in the 100% state while it actually configures
539 all packages.</para>
a9564741 540 <para>Note that it is not guaranteed that APT will support these options or that these options will
5e312de7
DK
541 not cause (big) trouble in the future. If you have understand the current risks and problems with
542 these options, but are brave enough to help testing them create a new configuration file and test a
543 combination of options. Please report any bugs, problems and improvements you encounter and make sure
544 to note which options you have used in your reports. Asking dpkg for help could also be useful for
545 debugging proposes, see e.g. <command>dpkg --audit</command>. A defensive option combination would be
3e9c4f70 546<literallayout>DPkg::NoTriggers "true";
5e312de7
DK
547PackageManager::Configure "smart";
548DPkg::ConfigurePending "true";
d5081aee 549DPkg::TriggersPending "true";</literallayout></para>
3e9c4f70
DK
550
551 <variablelist>
5e312de7 552 <varlistentry><term>DPkg::NoTriggers</term>
5f4331c4 553 <listitem><para>Add the no triggers flag to all dpkg calls (except the ConfigurePending call).
3e9c4f70 554 See &dpkg; if you are interested in what this actually means. In short: dpkg will not run the
5f4331c4 555 triggers when this flag is present unless it is explicitly called to do so in an extra call.
3e9c4f70
DK
556 Note that this option exists (undocumented) also in older apt versions with a slightly different
557 meaning: Previously these option only append --no-triggers to the configure calls to dpkg -
558 now apt will add these flag also to the unpack and remove calls.</para></listitem>
559 </varlistentry>
5e312de7
DK
560 <varlistentry><term>PackageManager::Configure</term>
561 <listitem><para>Valid values are "<literal>all</literal>", "<literal>smart</literal>" and "<literal>no</literal>".
562 "<literal>all</literal>" is the default value and causes APT to configure all packages explicit.
563 The "<literal>smart</literal>" way is it to configure only packages which need to be configured before
564 another package can be unpacked (Pre-Depends) and let the rest configure by dpkg with a call generated
565 by the next option. "<literal>no</literal>" on the other hand will not configure anything and totally
5f4331c4
DK
566 rely on dpkg for configuration (which will at the moment fail if a Pre-Depends is encountered).
567 Setting this option to another than the all value will implicitly activate also the next option per
3e9c4f70
DK
568 default as otherwise the system could end in an unconfigured status which could be unbootable!
569 </para></listitem>
570 </varlistentry>
5e312de7 571 <varlistentry><term>DPkg::ConfigurePending</term>
3e9c4f70
DK
572 <listitem><para>If this option is set apt will call <command>dpkg --configure --pending</command>
573 to let dpkg handle all required configurations and triggers. This option is activated automatic
5e312de7 574 per default if the previous option is not set to <literal>all</literal>, but deactivating could be useful
5f4331c4 575 if you want to run APT multiple times in a row - e.g. in an installer. In these sceneries you could
3e9c4f70
DK
576 deactivate this option in all but the last run.</para></listitem>
577 </varlistentry>
5e312de7
DK
578 <varlistentry><term>DPkg::TriggersPending</term>
579 <listitem><para>Useful for <literal>smart</literal> configuration as a package which has pending
580 triggers is not considered as <literal>installed</literal> and dpkg treats them as <literal>unpacked</literal>
581 currently which is a dealbreaker for Pre-Dependencies (see debbugs #526774). Note that this will
582 process all triggers, not only the triggers needed to configure this package.</para></listitem>
583 </varlistentry>
5e312de7
DK
584 <varlistentry><term>PackageManager::UnpackAll</term>
585 <listitem><para>As the configuration can be deferred to be done at the end by dpkg it can be
586 tried to order the unpack series only by critical needs, e.g. by Pre-Depends. Default is true
a9564741 587 and therefore the "old" method of ordering in various steps by everything. While both method
5e312de7
DK
588 were present in earlier APT versions the <literal>OrderCritical</literal> method was unused, so
589 this method is very experimental and needs further improvements before becoming really useful.
590 </para></listitem>
591 </varlistentry>
592 <varlistentry><term>OrderList::Score::Immediate</term>
593 <listitem><para>Essential packages (and there dependencies) should be configured immediately
594 after unpacking. It will be a good idea to do this quite early in the upgrade process as these
595 these configure calls require currently also <literal>DPkg::TriggersPending</literal> which
596 will run quite a few triggers (which maybe not needed). Essentials get per default a high score
a9564741 597 but the immediate flag is relatively low (a package which has a Pre-Depends is higher rated).
5e312de7
DK
598 These option and the others in the same group can be used to change the scoring. The following
599 example shows the settings with there default values.
600 <literallayout>OrderList::Score {
601 Delete 500;
602 Essential 200;
603 Immediate 10;
604 PreDepends 50;
605};</literallayout>
606 </para></listitem>
607 </varlistentry>
3e9c4f70
DK
608 </variablelist>
609 </refsect2>
24f6490f
AL
610 </refsect1>
611
0224daf2
EL
612 <refsect1>
613 <title>Periodic and Archives options</title>
614 <para><literal>APT::Periodic</literal> and <literal>APT::Archives</literal>
615 groups of options configure behavior of apt periodic updates, which is
616 done by <literal>/etc/cron.daily/apt</literal> script. See header of
617 this script for the brief documentation of these options.
618 </para>
619 </refsect1>
620
be1b8568
EL
621 <refsect1>
622 <title>Debug options</title>
623 <para>
624 Enabling options in the <literal>Debug::</literal> section will
625 cause debugging information to be sent to the standard error
626 stream of the program utilizing the <literal>apt</literal>
627 libraries, or enable special program modes that are primarily
628 useful for debugging the behavior of <literal>apt</literal>.
629 Most of these options are not interesting to a normal user, but a
630 few may be:
631
632 <itemizedlist>
633 <listitem>
634 <para>
635 <literal>Debug::pkgProblemResolver</literal> enables output
636 about the decisions made by
637 <literal>dist-upgrade, upgrade, install, remove, purge</literal>.
638 </para>
639 </listitem>
640
641 <listitem>
642 <para>
643 <literal>Debug::NoLocking</literal> disables all file
644 locking. This can be used to run some operations (for
645 instance, <literal>apt-get -s install</literal>) as a
646 non-root user.
647 </para>
648 </listitem>
649
650 <listitem>
651 <para>
652 <literal>Debug::pkgDPkgPM</literal> prints out the actual
653 command line each time that <literal>apt</literal> invokes
654 &dpkg;.
655 </para>
656 </listitem>
657
658 <listitem>
659 <para>
660 <literal>Debug::IdentCdrom</literal> disables the inclusion
661 of statfs data in CDROM IDs. <!-- TODO: provide a
662 motivating example, except I haven't a clue why you'd want
663 to do this. -->
664 </para>
665 </listitem>
666 </itemizedlist>
8a3642bd 667 </para>
be1b8568
EL
668
669 <para>
670 A full list of debugging options to apt follows.
671 </para>
672
673 <variablelist>
674 <varlistentry>
675 <term><literal>Debug::Acquire::cdrom</literal></term>
676
677 <listitem>
678 <para>
679 Print information related to accessing
680 <literal>cdrom://</literal> sources.
681 </para>
682 </listitem>
683 </varlistentry>
684
685 <varlistentry>
686 <term><literal>Debug::Acquire::ftp</literal></term>
687
688 <listitem>
689 <para>
690 Print information related to downloading packages using
691 FTP.
692 </para>
693 </listitem>
694 </varlistentry>
695
696 <varlistentry>
697 <term><literal>Debug::Acquire::http</literal></term>
698
699 <listitem>
700 <para>
701 Print information related to downloading packages using
702 HTTP.
703 </para>
704 </listitem>
705 </varlistentry>
706
707 <varlistentry>
708 <term><literal>Debug::Acquire::https</literal></term>
709
710 <listitem>
711 <para>
712 Print information related to downloading packages using
713 HTTPS.
714 </para>
715 </listitem>
716 </varlistentry>
717
718 <varlistentry>
719 <term><literal>Debug::Acquire::gpgv</literal></term>
720
721 <listitem>
722 <para>
723 Print information related to verifying cryptographic
724 signatures using <literal>gpg</literal>.
725 </para>
726 </listitem>
727 </varlistentry>
728
729 <varlistentry>
730 <term><literal>Debug::aptcdrom</literal></term>
731
732 <listitem>
733 <para>
734 Output information about the process of accessing
735 collections of packages stored on CD-ROMs.
736 </para>
737 </listitem>
738 </varlistentry>
739
740 <varlistentry>
741 <term><literal>Debug::BuildDeps</literal></term>
742 <listitem>
743 <para>
744 Describes the process of resolving build-dependencies in
745 &apt-get;.
746 </para>
747 </listitem>
748 </varlistentry>
749
750 <varlistentry>
751 <term><literal>Debug::Hashes</literal></term>
752 <listitem>
753 <para>
754 Output each cryptographic hash that is generated by the
755 <literal>apt</literal> libraries.
756 </para>
757 </listitem>
758 </varlistentry>
759
760 <varlistentry>
761 <term><literal>Debug::IdentCDROM</literal></term>
762 <listitem>
763 <para>
764 Do not include information from <literal>statfs</literal>,
765 namely the number of used and free blocks on the CD-ROM
766 filesystem, when generating an ID for a CD-ROM.
767 </para>
768 </listitem>
769 </varlistentry>
770
771 <varlistentry>
772 <term><literal>Debug::NoLocking</literal></term>
773 <listitem>
774 <para>
775 Disable all file locking. For instance, this will allow
776 two instances of <quote><literal>apt-get
777 update</literal></quote> to run at the same time.
778 </para>
779 </listitem>
780 </varlistentry>
781
782 <varlistentry>
783 <term><literal>Debug::pkgAcquire</literal></term>
784
785 <listitem>
786 <para>
787 Log when items are added to or removed from the global
788 download queue.
789 </para>
790 </listitem>
791 </varlistentry>
792
793 <varlistentry>
794 <term><literal>Debug::pkgAcquire::Auth</literal></term>
795 <listitem>
796 <para>
797 Output status messages and errors related to verifying
798 checksums and cryptographic signatures of downloaded files.
799 </para>
800 </listitem>
801 </varlistentry>
802
803 <varlistentry>
804 <term><literal>Debug::pkgAcquire::Diffs</literal></term>
805 <listitem>
806 <para>
807 Output information about downloading and applying package
808 index list diffs, and errors relating to package index list
809 diffs.
810 </para>
811 </listitem>
812 </varlistentry>
813
814 <varlistentry>
815 <term><literal>Debug::pkgAcquire::RRed</literal></term>
816
817 <listitem>
818 <para>
819 Output information related to patching apt package lists
820 when downloading index diffs instead of full indices.
821 </para>
822 </listitem>
823 </varlistentry>
824
825 <varlistentry>
826 <term><literal>Debug::pkgAcquire::Worker</literal></term>
827
828 <listitem>
829 <para>
830 Log all interactions with the sub-processes that actually
831 perform downloads.
832 </para>
833 </listitem>
834 </varlistentry>
835
836 <varlistentry>
837 <term><literal>Debug::pkgAutoRemove</literal></term>
838
839 <listitem>
840 <para>
841 Log events related to the automatically-installed status of
842 packages and to the removal of unused packages.
843 </para>
844 </listitem>
845 </varlistentry>
846
847 <varlistentry>
848 <term><literal>Debug::pkgDepCache::AutoInstall</literal></term>
849 <listitem>
850 <para>
851 Generate debug messages describing which packages are being
852 automatically installed to resolve dependencies. This
853 corresponds to the initial auto-install pass performed in,
854 e.g., <literal>apt-get install</literal>, and not to the
855 full <literal>apt</literal> dependency resolver; see
856 <literal>Debug::pkgProblemResolver</literal> for that.
857 </para>
858 </listitem>
859 </varlistentry>
860
af29ffb4
MV
861 <varlistentry>
862 <term><literal>Debug::pkgDepCache::Marker</literal></term>
863 <listitem>
864 <para>
865 Generate debug messages describing which package is marked
866 as keep/install/remove while the ProblemResolver does his work.
867 Each addition or deletion may trigger additional actions;
868 they are shown indented two additional space under the original entry.
869 The format for each line is <literal>MarkKeep</literal>,
870 <literal>MarkDelete</literal> or <literal>MarkInstall</literal> followed by
871 <literal>package-name &lt;a.b.c -&gt; d.e.f | x.y.z&gt; (section)</literal>
872 where <literal>a.b.c</literal> is the current version of the package,
873 <literal>d.e.f</literal> is the version considered for installation and
874 <literal>x.y.z</literal> is a newer version, but not considered for installation
875 (because of a low pin score). The later two can be omitted if there is none or if
876 it is the same version as the installed.
877 <literal>section</literal> is the name of the section the package appears in.
878 </para>
879 </listitem>
880 </varlistentry>
881
be1b8568
EL
882 <!-- Question: why doesn't this do anything? The code says it should. -->
883 <varlistentry>
884 <term><literal>Debug::pkgInitConfig</literal></term>
885 <listitem>
886 <para>
d82cdf73 887 Dump the default configuration to standard error on
be1b8568
EL
888 startup.
889 </para>
890 </listitem>
891 </varlistentry>
892
893 <varlistentry>
894 <term><literal>Debug::pkgDPkgPM</literal></term>
895 <listitem>
896 <para>
897 When invoking &dpkg;, output the precise command line with
898 which it is being invoked, with arguments separated by a
899 single space character.
900 </para>
901 </listitem>
902 </varlistentry>
903
904 <varlistentry>
905 <term><literal>Debug::pkgDPkgProgressReporting</literal></term>
906 <listitem>
907 <para>
908 Output all the data received from &dpkg; on the status file
909 descriptor and any errors encountered while parsing it.
910 </para>
911 </listitem>
912 </varlistentry>
913
914 <varlistentry>
915 <term><literal>Debug::pkgOrderList</literal></term>
916
917 <listitem>
918 <para>
919 Generate a trace of the algorithm that decides the order in
920 which <literal>apt</literal> should pass packages to
921 &dpkg;.
922 </para>
923 </listitem>
924 </varlistentry>
925
926 <varlistentry>
927 <term><literal>Debug::pkgPackageManager</literal></term>
928
929 <listitem>
930 <para>
931 Output status messages tracing the steps performed when
932 invoking &dpkg;.
933 </para>
934 </listitem>
935 </varlistentry>
936
937 <varlistentry>
938 <term><literal>Debug::pkgPolicy</literal></term>
939
940 <listitem>
941 <para>
942 Output the priority of each package list on startup.
943 </para>
944 </listitem>
945 </varlistentry>
946
947 <varlistentry>
948 <term><literal>Debug::pkgProblemResolver</literal></term>
949
950 <listitem>
951 <para>
952 Trace the execution of the dependency resolver (this
953 applies only to what happens when a complex dependency
954 problem is encountered).
955 </para>
956 </listitem>
957 </varlistentry>
958
8b4894fe
MV
959 <varlistentry>
960 <term><literal>Debug::pkgProblemResolver::ShowScores</literal></term>
961 <listitem>
962 <para>
963 Display a list of all installed packages with their calculated score
964 used by the pkgProblemResolver. The description of the package
965 is the same as described in <literal>Debug::pkgDepCache::Marker</literal>
966 </para>
967 </listitem>
968 </varlistentry>
969
be1b8568
EL
970 <varlistentry>
971 <term><literal>Debug::sourceList</literal></term>
972
973 <listitem>
974 <para>
975 Print information about the vendors read from
976 <filename>/etc/apt/vendors.list</filename>.
977 </para>
978 </listitem>
979 </varlistentry>
980
d82cdf73
MV
981<!-- 2009/07/11 Currently used nowhere. The corresponding code
982is commented.
be1b8568
EL
983 <varlistentry>
984 <term><literal>Debug::Vendor</literal></term>
985
986 <listitem>
987 <para>
988 Print information about each vendor.
989 </para>
990 </listitem>
991 </varlistentry>
d82cdf73 992-->
be1b8568 993 </variablelist>
24f6490f
AL
994 </refsect1>
995
996 <refsect1><title>Examples</title>
640c5d94
MZ
997 <para>&configureindex; is a
998 configuration file showing example values for all possible
24f6490f
AL
999 options.</para>
1000 </refsect1>
1001
1002 <refsect1><title>Files</title>
6e2525a1 1003 <variablelist>
1221c3a3 1004 &file-aptconf;
6e2525a1 1005 </variablelist>
24f6490f
AL
1006 </refsect1>
1007
1008 <refsect1><title>See Also</title>
1009 <para>&apt-cache;, &apt-config;<!-- ? reading apt.conf -->, &apt-preferences;.</para>
1010 </refsect1>
1011
1012 &manbugs;
24f6490f
AL
1013
1014</refentry>
1015