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