apt.conf.5.xml 65 KB

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