apt.conf.5.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  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. <!ENTITY % aptent SYSTEM "apt.ent">
  5. %aptent;
  6. ]>
  7. <refentry>
  8. <refentryinfo>
  9. &apt-author.jgunthorpe;
  10. &apt-author.team;
  11. <author>
  12. <firstname>Daniel</firstname>
  13. <surname>Burrows</surname>
  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>10 December 2008</date>
  21. </refentryinfo>
  22. <refmeta>
  23. <refentrytitle>apt.conf</refentrytitle>
  24. <manvolnum>5</manvolnum>
  25. </refmeta>
  26. <!-- Man page title -->
  27. <refnamediv>
  28. <refname>apt.conf</refname>
  29. <refpurpose>Configuration file for APT</refpurpose>
  30. </refnamediv>
  31. <refsect1><title>Description</title>
  32. <para><filename>apt.conf</filename> is the main configuration file for the APT suite of
  33. tools, all tools make use of the configuration file and a common command line
  34. parser to provide a uniform environment. When an APT tool starts up it will
  35. read the configuration specified by the <envar>APT_CONFIG</envar> environment
  36. variable (if any) and then read the files in <literal>Dir::Etc::Parts</literal>
  37. then read the main configuration file specified by
  38. <literal>Dir::Etc::main</literal> then finally apply the
  39. command line options to override the configuration directives, possibly
  40. loading even more config files.</para>
  41. <para>The configuration file is organized in a tree with options organized into
  42. functional groups. option specification is given with a double colon
  43. notation, for instance <literal>APT::Get::Assume-Yes</literal> is an option within
  44. the APT tool group, for the Get tool. options do not inherit from their
  45. parent groups.</para>
  46. <para>Syntactically the configuration language is modeled after what the ISC tools
  47. such as bind and dhcp use. Lines starting with
  48. <literal>//</literal> are treated as comments (ignored), as well as all text
  49. between <literal>/*</literal> and <literal>*/</literal>, just like C/C++ comments.
  50. Each line is of the form
  51. <literal>APT::Get::Assume-Yes "true";</literal> The trailing
  52. semicolon is required and the quotes are optional. A new scope can be
  53. opened with curly braces, like:</para>
  54. <informalexample><programlisting>
  55. APT {
  56. Get {
  57. Assume-Yes "true";
  58. Fix-Broken "true";
  59. };
  60. };
  61. </programlisting></informalexample>
  62. <para>with newlines placed to make it more readable. Lists can be created by
  63. opening a scope and including a single string enclosed in quotes followed by a
  64. semicolon. Multiple entries can be included, each separated by a semicolon.</para>
  65. <informalexample><programlisting>
  66. DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
  67. </programlisting></informalexample>
  68. <para>In general the sample configuration file in
  69. <filename>&docdir;examples/apt.conf</filename> &configureindex;
  70. is a good guide for how it should look.</para>
  71. <para>The names of the configuration items are not case-sensitive. So in the previous example
  72. you could use <literal>dpkg::pre-install-pkgs</literal>.</para>
  73. <para>Two specials are allowed, <literal>#include</literal> and <literal>#clear</literal>
  74. <literal>#include</literal> will include the given file, unless the filename
  75. ends in a slash, then the whole directory is included.
  76. <literal>#clear</literal> is used to erase a part of the configuration tree. The
  77. specified element and all its descendents are erased.</para>
  78. <para>All of the APT tools take a -o option which allows an arbitrary configuration
  79. directive to be specified on the command line. The syntax is a full option
  80. name (<literal>APT::Get::Assume-Yes</literal> for instance) followed by an equals
  81. sign then the new value of the option. Lists can be appended too by adding
  82. a trailing :: to the list name.</para>
  83. </refsect1>
  84. <refsect1><title>The APT Group</title>
  85. <para>This group of options controls general APT behavior as well as holding the
  86. options for all of the tools.</para>
  87. <variablelist>
  88. <varlistentry><term>Architecture</term>
  89. <listitem><para>System Architecture; sets the architecture to use when fetching files and
  90. parsing package lists. The internal default is the architecture apt was
  91. compiled for.</para></listitem>
  92. </varlistentry>
  93. <varlistentry><term>Default-Release</term>
  94. <listitem><para>Default release to install packages from if more than one
  95. 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>
  96. </varlistentry>
  97. <varlistentry><term>Ignore-Hold</term>
  98. <listitem><para>Ignore Held packages; This global option causes the problem resolver to
  99. ignore held packages in its decision making.</para></listitem>
  100. </varlistentry>
  101. <varlistentry><term>Clean-Installed</term>
  102. <listitem><para>Defaults to on. When turned on the autoclean feature will remove any packages
  103. which can no longer be downloaded from the cache. If turned off then
  104. packages that are locally installed are also excluded from cleaning - but
  105. note that APT provides no direct means to reinstall them.</para></listitem>
  106. </varlistentry>
  107. <varlistentry><term>Immediate-Configure</term>
  108. <listitem><para>Disable Immediate Configuration; This dangerous option disables some
  109. of APT's ordering code to cause it to make fewer dpkg calls. Doing
  110. so may be necessary on some extremely slow single user systems but
  111. is very dangerous and may cause package install scripts to fail or worse.
  112. Use at your own risk.</para></listitem>
  113. </varlistentry>
  114. <varlistentry><term>Force-LoopBreak</term>
  115. <listitem><para>Never Enable this option unless you -really- know what you are doing. It
  116. permits APT to temporarily remove an essential package to break a
  117. Conflicts/Conflicts or Conflicts/Pre-Depend loop between two essential
  118. packages. SUCH A LOOP SHOULD NEVER EXIST AND IS A GRAVE BUG. This option
  119. will work if the essential packages are not tar, gzip, libc, dpkg, bash or
  120. anything that those packages depend on.</para></listitem>
  121. </varlistentry>
  122. <varlistentry><term>Cache-Limit</term>
  123. <listitem><para>APT uses a fixed size memory mapped cache file to store the 'available'
  124. information. This sets the size of that cache (in bytes).</para></listitem>
  125. </varlistentry>
  126. <varlistentry><term>Build-Essential</term>
  127. <listitem><para>Defines which package(s) are considered essential build dependencies.</para></listitem>
  128. </varlistentry>
  129. <varlistentry><term>Get</term>
  130. <listitem><para>The Get subsection controls the &apt-get; tool, please see its
  131. documentation for more information about the options here.</para></listitem>
  132. </varlistentry>
  133. <varlistentry><term>Cache</term>
  134. <listitem><para>The Cache subsection controls the &apt-cache; tool, please see its
  135. documentation for more information about the options here.</para></listitem>
  136. </varlistentry>
  137. <varlistentry><term>CDROM</term>
  138. <listitem><para>The CDROM subsection controls the &apt-cdrom; tool, please see its
  139. documentation for more information about the options here.</para></listitem>
  140. </varlistentry>
  141. </variablelist>
  142. </refsect1>
  143. <refsect1><title>The Acquire Group</title>
  144. <para>The <literal>Acquire</literal> group of options controls the download of packages
  145. and the URI handlers.
  146. <variablelist>
  147. <varlistentry><term>PDiffs</term>
  148. <listitem><para>Try to download deltas called <literal>PDiffs</literal> for
  149. Packages or Sources files instead of downloading whole ones. True
  150. by default.</para></listitem>
  151. </varlistentry>
  152. <varlistentry><term>Queue-Mode</term>
  153. <listitem><para>Queuing mode; <literal>Queue-Mode</literal> can be one of <literal>host</literal> or
  154. <literal>access</literal> which determines how APT parallelizes outgoing
  155. connections. <literal>host</literal> means that one connection per target host
  156. will be opened, <literal>access</literal> means that one connection per URI type
  157. will be opened.</para></listitem>
  158. </varlistentry>
  159. <varlistentry><term>Retries</term>
  160. <listitem><para>Number of retries to perform. If this is non-zero APT will retry failed
  161. files the given number of times.</para></listitem>
  162. </varlistentry>
  163. <varlistentry><term>Source-Symlinks</term>
  164. <listitem><para>Use symlinks for source archives. If set to true then source archives will
  165. be symlinked when possible instead of copying. True is the default.</para></listitem>
  166. </varlistentry>
  167. <varlistentry><term>http</term>
  168. <listitem><para>HTTP URIs; http::Proxy is the default http proxy to use. It is in the
  169. standard form of <literal>http://[[user][:pass]@]host[:port]/</literal>. Per
  170. host proxies can also be specified by using the form
  171. <literal>http::Proxy::&lt;host&gt;</literal> with the special keyword <literal>DIRECT</literal>
  172. meaning to use no proxies. The <envar>http_proxy</envar> environment variable
  173. will override all settings.</para>
  174. <para>Three settings are provided for cache control with HTTP/1.1 compliant
  175. proxy caches. <literal>No-Cache</literal> tells the proxy to not use its cached
  176. response under any circumstances, <literal>Max-Age</literal> is sent only for
  177. index files and tells the cache to refresh its object if it is older than
  178. the given number of seconds. Debian updates its index files daily so the
  179. default is 1 day. <literal>No-Store</literal> specifies that the cache should never
  180. store this request, it is only set for archive files. This may be useful
  181. to prevent polluting a proxy cache with very large .deb files. Note:
  182. Squid 2.0.2 does not support any of these options.</para>
  183. <para>The option <literal>timeout</literal> sets the timeout timer used by the method,
  184. this applies to all things including connection timeout and data timeout.</para>
  185. <para>One setting is provided to control the pipeline depth in cases where the
  186. remote server is not RFC conforming or buggy (such as Squid 2.0.2)
  187. <literal>Acquire::http::Pipeline-Depth</literal> can be a value from 0 to 5
  188. indicating how many outstanding requests APT should send. A value of
  189. zero MUST be specified if the remote host does not properly linger
  190. on TCP connections - otherwise data corruption will occur. Hosts which
  191. require this are in violation of RFC 2068.</para></listitem>
  192. </varlistentry>
  193. <varlistentry><term>https</term>
  194. <listitem><para>HTTPS URIs. Cache-control and proxy options are the same as for
  195. <literal>http</literal> method.
  196. <literal>Pipeline-Depth</literal> option is not supported yet.</para>
  197. <para><literal>CaInfo</literal> suboption specifies place of file that
  198. holds info about trusted certificates.
  199. <literal>&lt;host&gt;::CaInfo</literal> is corresponding per-host option.
  200. <literal>Verify-Peer</literal> boolean suboption determines whether verify
  201. server's host certificate against trusted certificates or not.
  202. <literal>&lt;host&gt;::Verify-Peer</literal> is corresponding per-host option.
  203. <literal>Verify-Host</literal> boolean suboption determines whether verify
  204. server's hostname or not.
  205. <literal>&lt;host&gt;::Verify-Host</literal> is corresponding per-host option.
  206. <literal>SslCert</literal> determines what certificate to use for client
  207. authentication. <literal>&lt;host&gt;::SslCert</literal> is corresponding per-host option.
  208. <literal>SslKey</literal> determines what private key to use for client
  209. authentication. <literal>&lt;host&gt;::SslKey</literal> is corresponding per-host option.
  210. <literal>SslForceVersion</literal> overrides default SSL version to use.
  211. Can contain 'TLSv1' or 'SSLv3' string.
  212. <literal>&lt;host&gt;::SslForceVersion</literal> is corresponding per-host option.
  213. </para></listitem></varlistentry>
  214. <varlistentry><term>ftp</term>
  215. <listitem><para>FTP URIs; ftp::Proxy is the default proxy server to use. It is in the
  216. standard form of <literal>ftp://[[user][:pass]@]host[:port]/</literal> and is
  217. overridden by the <envar>ftp_proxy</envar> environment variable. To use a ftp
  218. proxy you will have to set the <literal>ftp::ProxyLogin</literal> script in the
  219. configuration file. This entry specifies the commands to send to tell
  220. the proxy server what to connect to. Please see
  221. &configureindex; for an example of
  222. how to do this. The substitution variables available are
  223. <literal>$(PROXY_USER)</literal> <literal>$(PROXY_PASS)</literal> <literal>$(SITE_USER)</literal>
  224. <literal>$(SITE_PASS)</literal> <literal>$(SITE)</literal> and <literal>$(SITE_PORT)</literal>
  225. Each is taken from it's respective URI component.</para>
  226. <para>The option <literal>timeout</literal> sets the timeout timer used by the method,
  227. this applies to all things including connection timeout and data timeout.</para>
  228. <para>Several settings are provided to control passive mode. Generally it is
  229. safe to leave passive mode on, it works in nearly every environment.
  230. However some situations require that passive mode be disabled and port
  231. mode ftp used instead. This can be done globally, for connections that
  232. go through a proxy or for a specific host (See the sample config file
  233. for examples).</para>
  234. <para>It is possible to proxy FTP over HTTP by setting the <envar>ftp_proxy</envar>
  235. environment variable to a http url - see the discussion of the http method
  236. above for syntax. You cannot set this in the configuration file and it is
  237. not recommended to use FTP over HTTP due to its low efficiency.</para>
  238. <para>The setting <literal>ForceExtended</literal> controls the use of RFC2428
  239. <literal>EPSV</literal> and <literal>EPRT</literal> commands. The default is false, which means
  240. these commands are only used if the control connection is IPv6. Setting this
  241. to true forces their use even on IPv4 connections. Note that most FTP servers
  242. do not support RFC2428.</para></listitem>
  243. </varlistentry>
  244. <varlistentry><term>cdrom</term>
  245. <listitem><para>CDROM URIs; the only setting for CDROM URIs is the mount point,
  246. <literal>cdrom::Mount</literal> which must be the mount point for the CDROM drive
  247. as specified in <filename>/etc/fstab</filename>. It is possible to provide
  248. alternate mount and unmount commands if your mount point cannot be listed
  249. in the fstab (such as an SMB mount and old mount packages). The syntax
  250. is to put <literallayout>"/cdrom/"::Mount "foo";</literallayout> within
  251. the cdrom block. It is important to have the trailing slash. Unmount
  252. commands can be specified using UMount.</para></listitem>
  253. </varlistentry>
  254. <varlistentry><term>gpgv</term>
  255. <listitem><para>GPGV URIs; the only option for GPGV URIs is the option to pass additional parameters to gpgv.
  256. <literal>gpgv::Options</literal> Additional options passed to gpgv.
  257. </para></listitem>
  258. </varlistentry>
  259. <varlistentry><term>CompressionTypes</term>
  260. <listitem><para>List of compression types which are understood by the acquire methods.
  261. Files like <filename>Packages</filename> can be available in various compression formats.
  262. This list defines in which order the acquire methods will try to download these files.
  263. Per default <command>bzip2</command> compressed files will be prefered over
  264. <command>lzma</command>, <command>gzip</command> and uncompressed files. The syntax for
  265. the configuration fileentry (this option can't be set at runtime with the -o option) is
  266. <synopsis>Acquire::CompressionTypes::<replaceable>FileExtension</replaceable> "<replaceable>Methodname</replaceable>";</synopsis>
  267. e.g. <synopsis>Acquire::CompressionTypes::bz2 "bzip2";</synopsis>
  268. Note that at runtime the <literal>Dir::Bin::<replaceable>Methodname</replaceable></literal> will
  269. be checked: If this setting exists the method will only be used if this file exists, e.g. for
  270. the bzip2 method above (the inbuilt) setting is <literallayout>Dir::Bin::bzip2 "/bin/bzip2";</literallayout>
  271. </para></listitem>
  272. </varlistentry>
  273. </variablelist>
  274. </para>
  275. </refsect1>
  276. <refsect1><title>Directories</title>
  277. <para>The <literal>Dir::State</literal> section has directories that pertain to local
  278. state information. <literal>lists</literal> is the directory to place downloaded
  279. package lists in and <literal>status</literal> is the name of the dpkg status file.
  280. <literal>preferences</literal> is the name of the APT preferences file.
  281. <literal>Dir::State</literal> contains the default directory to prefix on all sub
  282. items if they do not start with <filename>/</filename> or <filename>./</filename>.</para>
  283. <para><literal>Dir::Cache</literal> contains locations pertaining to local cache
  284. information, such as the two package caches <literal>srcpkgcache</literal> and
  285. <literal>pkgcache</literal> as well as the location to place downloaded archives,
  286. <literal>Dir::Cache::archives</literal>. Generation of caches can be turned off
  287. by setting their names to be blank. This will slow down startup but
  288. save disk space. It is probably preferred to turn off the pkgcache rather
  289. than the srcpkgcache. Like <literal>Dir::State</literal> the default
  290. directory is contained in <literal>Dir::Cache</literal></para>
  291. <para><literal>Dir::Etc</literal> contains the location of configuration files,
  292. <literal>sourcelist</literal> gives the location of the sourcelist and
  293. <literal>main</literal> is the default configuration file (setting has no effect,
  294. unless it is done from the config file specified by
  295. <envar>APT_CONFIG</envar>).</para>
  296. <para>The <literal>Dir::Parts</literal> setting reads in all the config fragments in
  297. lexical order from the directory specified. After this is done then the
  298. main config file is loaded.</para>
  299. <para>Binary programs are pointed to by <literal>Dir::Bin</literal>. <literal>Dir::Bin::Methods</literal>
  300. specifies the location of the method handlers and <literal>gzip</literal>,
  301. <literal>bzip2</literal>, <literal>lzma</literal>,
  302. <literal>dpkg</literal>, <literal>apt-get</literal> <literal>dpkg-source</literal>
  303. <literal>dpkg-buildpackage</literal> and <literal>apt-cache</literal> specify the location
  304. of the respective programs.</para>
  305. <para>
  306. The configuration item <literal>RootDir</literal> has a special
  307. meaning. If set, all paths in <literal>Dir::</literal> will be
  308. relative to <literal>RootDir</literal>, <emphasis>even paths that
  309. are specified absolutely</emphasis>. So, for instance, if
  310. <literal>RootDir</literal> is set to
  311. <filename>/tmp/staging</filename> and
  312. <literal>Dir::State::status</literal> is set to
  313. <filename>/var/lib/dpkg/status</filename>, then the status file
  314. will be looked up in
  315. <filename>/tmp/staging/var/lib/dpkg/status</filename>.
  316. </para>
  317. </refsect1>
  318. <refsect1><title>APT in DSelect</title>
  319. <para>
  320. When APT is used as a &dselect; method several configuration directives
  321. control the default behaviour. These are in the <literal>DSelect</literal> section.</para>
  322. <variablelist>
  323. <varlistentry><term>Clean</term>
  324. <listitem><para>Cache Clean mode; this value may be one of always, prompt, auto,
  325. pre-auto and never. always and prompt will remove all packages from
  326. the cache after upgrading, prompt (the default) does so conditionally.
  327. auto removes only those packages which are no longer downloadable
  328. (replaced with a new version for instance). pre-auto performs this
  329. action before downloading new packages.</para></listitem>
  330. </varlistentry>
  331. <varlistentry><term>options</term>
  332. <listitem><para>The contents of this variable is passed to &apt-get; as command line
  333. options when it is run for the install phase.</para></listitem>
  334. </varlistentry>
  335. <varlistentry><term>Updateoptions</term>
  336. <listitem><para>The contents of this variable is passed to &apt-get; as command line
  337. options when it is run for the update phase.</para></listitem>
  338. </varlistentry>
  339. <varlistentry><term>PromptAfterUpdate</term>
  340. <listitem><para>If true the [U]pdate operation in &dselect; will always prompt to continue.
  341. The default is to prompt only on error.</para></listitem>
  342. </varlistentry>
  343. </variablelist>
  344. </refsect1>
  345. <refsect1><title>How APT calls dpkg</title>
  346. <para>Several configuration directives control how APT invokes &dpkg;. These are
  347. in the <literal>DPkg</literal> section.</para>
  348. <variablelist>
  349. <varlistentry><term>options</term>
  350. <listitem><para>This is a list of options to pass to dpkg. The options must be specified
  351. using the list notation and each list item is passed as a single argument
  352. to &dpkg;.</para></listitem>
  353. </varlistentry>
  354. <varlistentry><term>Pre-Invoke</term><term>Post-Invoke</term>
  355. <listitem><para>This is a list of shell commands to run before/after invoking &dpkg;.
  356. Like <literal>options</literal> this must be specified in list notation. The
  357. commands are invoked in order using <filename>/bin/sh</filename>, should any
  358. fail APT will abort.</para></listitem>
  359. </varlistentry>
  360. <varlistentry><term>Pre-Install-Pkgs</term>
  361. <listitem><para>This is a list of shell commands to run before invoking dpkg. Like
  362. <literal>options</literal> this must be specified in list notation. The commands
  363. are invoked in order using <filename>/bin/sh</filename>, should any fail APT
  364. will abort. APT will pass to the commands on standard input the
  365. filenames of all .deb files it is going to install, one per line.</para>
  366. <para>Version 2 of this protocol dumps more information, including the
  367. protocol version, the APT configuration space and the packages, files
  368. and versions being changed. Version 2 is enabled by setting
  369. <literal>DPkg::Tools::options::cmd::Version</literal> to 2. <literal>cmd</literal> is a
  370. command given to <literal>Pre-Install-Pkgs</literal>.</para></listitem>
  371. </varlistentry>
  372. <varlistentry><term>Run-Directory</term>
  373. <listitem><para>APT chdirs to this directory before invoking dpkg, the default is
  374. <filename>/</filename>.</para></listitem>
  375. </varlistentry>
  376. <varlistentry><term>Build-options</term>
  377. <listitem><para>These options are passed to &dpkg-buildpackage; when compiling packages,
  378. the default is to disable signing and produce all binaries.</para></listitem>
  379. </varlistentry>
  380. </variablelist>
  381. </refsect1>
  382. <refsect1>
  383. <title>Periodic and Archives options</title>
  384. <para><literal>APT::Periodic</literal> and <literal>APT::Archives</literal>
  385. groups of options configure behavior of apt periodic updates, which is
  386. done by <literal>/etc/cron.daily/apt</literal> script. See header of
  387. this script for the brief documentation of these options.
  388. </para>
  389. </refsect1>
  390. <refsect1>
  391. <title>Debug options</title>
  392. <para>
  393. Enabling options in the <literal>Debug::</literal> section will
  394. cause debugging information to be sent to the standard error
  395. stream of the program utilizing the <literal>apt</literal>
  396. libraries, or enable special program modes that are primarily
  397. useful for debugging the behavior of <literal>apt</literal>.
  398. Most of these options are not interesting to a normal user, but a
  399. few may be:
  400. <itemizedlist>
  401. <listitem>
  402. <para>
  403. <literal>Debug::pkgProblemResolver</literal> enables output
  404. about the decisions made by
  405. <literal>dist-upgrade, upgrade, install, remove, purge</literal>.
  406. </para>
  407. </listitem>
  408. <listitem>
  409. <para>
  410. <literal>Debug::NoLocking</literal> disables all file
  411. locking. This can be used to run some operations (for
  412. instance, <literal>apt-get -s install</literal>) as a
  413. non-root user.
  414. </para>
  415. </listitem>
  416. <listitem>
  417. <para>
  418. <literal>Debug::pkgDPkgPM</literal> prints out the actual
  419. command line each time that <literal>apt</literal> invokes
  420. &dpkg;.
  421. </para>
  422. </listitem>
  423. <listitem>
  424. <para>
  425. <literal>Debug::IdentCdrom</literal> disables the inclusion
  426. of statfs data in CDROM IDs. <!-- TODO: provide a
  427. motivating example, except I haven't a clue why you'd want
  428. to do this. -->
  429. </para>
  430. </listitem>
  431. </itemizedlist>
  432. </para>
  433. <para>
  434. A full list of debugging options to apt follows.
  435. </para>
  436. <variablelist>
  437. <varlistentry>
  438. <term><literal>Debug::Acquire::cdrom</literal></term>
  439. <listitem>
  440. <para>
  441. Print information related to accessing
  442. <literal>cdrom://</literal> sources.
  443. </para>
  444. </listitem>
  445. </varlistentry>
  446. <varlistentry>
  447. <term><literal>Debug::Acquire::ftp</literal></term>
  448. <listitem>
  449. <para>
  450. Print information related to downloading packages using
  451. FTP.
  452. </para>
  453. </listitem>
  454. </varlistentry>
  455. <varlistentry>
  456. <term><literal>Debug::Acquire::http</literal></term>
  457. <listitem>
  458. <para>
  459. Print information related to downloading packages using
  460. HTTP.
  461. </para>
  462. </listitem>
  463. </varlistentry>
  464. <varlistentry>
  465. <term><literal>Debug::Acquire::https</literal></term>
  466. <listitem>
  467. <para>
  468. Print information related to downloading packages using
  469. HTTPS.
  470. </para>
  471. </listitem>
  472. </varlistentry>
  473. <varlistentry>
  474. <term><literal>Debug::Acquire::gpgv</literal></term>
  475. <listitem>
  476. <para>
  477. Print information related to verifying cryptographic
  478. signatures using <literal>gpg</literal>.
  479. </para>
  480. </listitem>
  481. </varlistentry>
  482. <varlistentry>
  483. <term><literal>Debug::aptcdrom</literal></term>
  484. <listitem>
  485. <para>
  486. Output information about the process of accessing
  487. collections of packages stored on CD-ROMs.
  488. </para>
  489. </listitem>
  490. </varlistentry>
  491. <varlistentry>
  492. <term><literal>Debug::BuildDeps</literal></term>
  493. <listitem>
  494. <para>
  495. Describes the process of resolving build-dependencies in
  496. &apt-get;.
  497. </para>
  498. </listitem>
  499. </varlistentry>
  500. <varlistentry>
  501. <term><literal>Debug::Hashes</literal></term>
  502. <listitem>
  503. <para>
  504. Output each cryptographic hash that is generated by the
  505. <literal>apt</literal> libraries.
  506. </para>
  507. </listitem>
  508. </varlistentry>
  509. <varlistentry>
  510. <term><literal>Debug::IdentCDROM</literal></term>
  511. <listitem>
  512. <para>
  513. Do not include information from <literal>statfs</literal>,
  514. namely the number of used and free blocks on the CD-ROM
  515. filesystem, when generating an ID for a CD-ROM.
  516. </para>
  517. </listitem>
  518. </varlistentry>
  519. <varlistentry>
  520. <term><literal>Debug::NoLocking</literal></term>
  521. <listitem>
  522. <para>
  523. Disable all file locking. For instance, this will allow
  524. two instances of <quote><literal>apt-get
  525. update</literal></quote> to run at the same time.
  526. </para>
  527. </listitem>
  528. </varlistentry>
  529. <varlistentry>
  530. <term><literal>Debug::pkgAcquire</literal></term>
  531. <listitem>
  532. <para>
  533. Log when items are added to or removed from the global
  534. download queue.
  535. </para>
  536. </listitem>
  537. </varlistentry>
  538. <varlistentry>
  539. <term><literal>Debug::pkgAcquire::Auth</literal></term>
  540. <listitem>
  541. <para>
  542. Output status messages and errors related to verifying
  543. checksums and cryptographic signatures of downloaded files.
  544. </para>
  545. </listitem>
  546. </varlistentry>
  547. <varlistentry>
  548. <term><literal>Debug::pkgAcquire::Diffs</literal></term>
  549. <listitem>
  550. <para>
  551. Output information about downloading and applying package
  552. index list diffs, and errors relating to package index list
  553. diffs.
  554. </para>
  555. </listitem>
  556. </varlistentry>
  557. <varlistentry>
  558. <term><literal>Debug::pkgAcquire::RRed</literal></term>
  559. <listitem>
  560. <para>
  561. Output information related to patching apt package lists
  562. when downloading index diffs instead of full indices.
  563. </para>
  564. </listitem>
  565. </varlistentry>
  566. <varlistentry>
  567. <term><literal>Debug::pkgAcquire::Worker</literal></term>
  568. <listitem>
  569. <para>
  570. Log all interactions with the sub-processes that actually
  571. perform downloads.
  572. </para>
  573. </listitem>
  574. </varlistentry>
  575. <varlistentry>
  576. <term><literal>Debug::pkgAutoRemove</literal></term>
  577. <listitem>
  578. <para>
  579. Log events related to the automatically-installed status of
  580. packages and to the removal of unused packages.
  581. </para>
  582. </listitem>
  583. </varlistentry>
  584. <varlistentry>
  585. <term><literal>Debug::pkgDepCache::AutoInstall</literal></term>
  586. <listitem>
  587. <para>
  588. Generate debug messages describing which packages are being
  589. automatically installed to resolve dependencies. This
  590. corresponds to the initial auto-install pass performed in,
  591. e.g., <literal>apt-get install</literal>, and not to the
  592. full <literal>apt</literal> dependency resolver; see
  593. <literal>Debug::pkgProblemResolver</literal> for that.
  594. </para>
  595. </listitem>
  596. </varlistentry>
  597. <varlistentry>
  598. <term><literal>Debug::pkgDepCache::Marker</literal></term>
  599. <listitem>
  600. <para>
  601. Generate debug messages describing which package is marked
  602. as keep/install/remove while the ProblemResolver does his work.
  603. Each addition or deletion may trigger additional actions;
  604. they are shown indented two additional space under the original entry.
  605. The format for each line is <literal>MarkKeep</literal>,
  606. <literal>MarkDelete</literal> or <literal>MarkInstall</literal> followed by
  607. <literal>package-name &lt;a.b.c -&gt; d.e.f | x.y.z&gt; (section)</literal>
  608. where <literal>a.b.c</literal> is the current version of the package,
  609. <literal>d.e.f</literal> is the version considered for installation and
  610. <literal>x.y.z</literal> is a newer version, but not considered for installation
  611. (because of a low pin score). The later two can be omitted if there is none or if
  612. it is the same version as the installed.
  613. <literal>section</literal> is the name of the section the package appears in.
  614. </para>
  615. </listitem>
  616. </varlistentry>
  617. <!-- Question: why doesn't this do anything? The code says it should. -->
  618. <varlistentry>
  619. <term><literal>Debug::pkgInitConfig</literal></term>
  620. <listitem>
  621. <para>
  622. Dump the default configuration to standard error on
  623. startup.
  624. </para>
  625. </listitem>
  626. </varlistentry>
  627. <varlistentry>
  628. <term><literal>Debug::pkgDPkgPM</literal></term>
  629. <listitem>
  630. <para>
  631. When invoking &dpkg;, output the precise command line with
  632. which it is being invoked, with arguments separated by a
  633. single space character.
  634. </para>
  635. </listitem>
  636. </varlistentry>
  637. <varlistentry>
  638. <term><literal>Debug::pkgDPkgProgressReporting</literal></term>
  639. <listitem>
  640. <para>
  641. Output all the data received from &dpkg; on the status file
  642. descriptor and any errors encountered while parsing it.
  643. </para>
  644. </listitem>
  645. </varlistentry>
  646. <varlistentry>
  647. <term><literal>Debug::pkgOrderList</literal></term>
  648. <listitem>
  649. <para>
  650. Generate a trace of the algorithm that decides the order in
  651. which <literal>apt</literal> should pass packages to
  652. &dpkg;.
  653. </para>
  654. </listitem>
  655. </varlistentry>
  656. <varlistentry>
  657. <term><literal>Debug::pkgPackageManager</literal></term>
  658. <listitem>
  659. <para>
  660. Output status messages tracing the steps performed when
  661. invoking &dpkg;.
  662. </para>
  663. </listitem>
  664. </varlistentry>
  665. <varlistentry>
  666. <term><literal>Debug::pkgPolicy</literal></term>
  667. <listitem>
  668. <para>
  669. Output the priority of each package list on startup.
  670. </para>
  671. </listitem>
  672. </varlistentry>
  673. <varlistentry>
  674. <term><literal>Debug::pkgProblemResolver</literal></term>
  675. <listitem>
  676. <para>
  677. Trace the execution of the dependency resolver (this
  678. applies only to what happens when a complex dependency
  679. problem is encountered).
  680. </para>
  681. </listitem>
  682. </varlistentry>
  683. <varlistentry>
  684. <term><literal>Debug::pkgProblemResolver::ShowScores</literal></term>
  685. <listitem>
  686. <para>
  687. Display a list of all installed packages with their calculated score
  688. used by the pkgProblemResolver. The description of the package
  689. is the same as described in <literal>Debug::pkgDepCache::Marker</literal>
  690. </para>
  691. </listitem>
  692. </varlistentry>
  693. <varlistentry>
  694. <term><literal>Debug::sourceList</literal></term>
  695. <listitem>
  696. <para>
  697. Print information about the vendors read from
  698. <filename>/etc/apt/vendors.list</filename>.
  699. </para>
  700. </listitem>
  701. </varlistentry>
  702. <!-- 2009/07/11 Currently used nowhere. The corresponding code
  703. is commented.
  704. <varlistentry>
  705. <term><literal>Debug::Vendor</literal></term>
  706. <listitem>
  707. <para>
  708. Print information about each vendor.
  709. </para>
  710. </listitem>
  711. </varlistentry>
  712. -->
  713. </variablelist>
  714. </refsect1>
  715. <refsect1><title>Examples</title>
  716. <para>&configureindex; is a
  717. configuration file showing example values for all possible
  718. options.</para>
  719. </refsect1>
  720. <refsect1><title>Files</title>
  721. <variablelist>
  722. <varlistentry><term><filename>/etc/apt/apt.conf</filename></term>
  723. <listitem><para>APT configuration file.
  724. Configuration Item: <literal>Dir::Etc::Main</literal>.</para></listitem>
  725. </varlistentry>
  726. <varlistentry><term><filename>/etc/apt/apt.conf.d/</filename></term>
  727. <listitem><para>APT configuration file fragments.
  728. Configuration Item: <literal>Dir::Etc::Parts</literal>.</para></listitem>
  729. </varlistentry>
  730. </variablelist>
  731. </refsect1>
  732. <refsect1><title>See Also</title>
  733. <para>&apt-cache;, &apt-config;<!-- ? reading apt.conf -->, &apt-preferences;.</para>
  734. </refsect1>
  735. &manbugs;
  736. </refentry>