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