1APT.CONF(5) APT APT.CONF(5)
2
3
4
6 apt.conf - Configuration file for APT
7
9 /etc/apt/apt.conf is the main configuration file shared by all the
10 tools in the APT suite of tools, though it is by no means the only
11 place options can be set. The suite also shares a common command line
12 parser to provide a uniform environment.
13
14 When an APT tool starts up it will read the configuration files in the
15 following order:
16
17 1. the file specified by the APT_CONFIG environment variable (if any)
18
19 2. all files in Dir::Etc::Parts in alphanumeric ascending order which
20 have either no or "conf" as filename extension and which only
21 contain alphanumeric, hyphen (-), underscore (_) and period (.)
22 characters. Otherwise APT will print a notice that it has ignored a
23 file, unless that file matches a pattern in the
24 Dir::Ignore-Files-Silently configuration list - in which case it
25 will be silently ignored.
26
27 3. the main configuration file specified by Dir::Etc::main
28
29 4. all options set in the binary specific configuration subtree are
30 moved into the root of the tree.
31
32 5. the command line options are applied to override the configuration
33 directives or to load even more configuration files.
34
36 The configuration file is organized in a tree with options organized
37 into functional groups. Option specification is given with a double
38 colon notation; for instance APT::Get::Assume-Yes is an option within
39 the APT tool group, for the Get tool. Options do not inherit from their
40 parent groups.
41
42 Syntactically the configuration language is modeled after what the ISC
43 tools such as bind and dhcp use. Lines starting with // are treated as
44 comments (ignored), as well as all text between /* and */, just like
45 C/C++ comments. Each line is of the form APT::Get::Assume-Yes "true";.
46 The quotation marks and trailing semicolon are required. The value must
47 be on one line, and there is no kind of string concatenation. Values
48 must not include backslashes or extra quotation marks. Option names are
49 made up of alphanumeric characters and the characters "/-:._+". A new
50 scope can be opened with curly braces, like this:
51
52
53 APT {
54 Get {
55 Assume-Yes "true";
56 Fix-Broken "true";
57 };
58 };
59
60 with newlines placed to make it more readable. Lists can be created by
61 opening a scope and including a single string enclosed in quotes
62 followed by a semicolon. Multiple entries can be included, separated by
63 a semicolon.
64
65
66 DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
67
68 In general the sample configuration file
69 /usr/share/doc/apt/examples/configure-index.gz is a good guide for how
70 it should look.
71
72 Case is not significant in names of configuration items, so in the
73 previous example you could use dpkg::pre-install-pkgs.
74
75 Names for the configuration items are optional if a list is defined as
76 can be seen in the DPkg::Pre-Install-Pkgs example above. If you don't
77 specify a name a new entry will simply add a new option to the list. If
78 you specify a name you can override the option in the same way as any
79 other option by reassigning a new value to the option.
80
81 Two special commands are defined: #include (which is deprecated and not
82 supported by alternative implementations) and #clear. #include will
83 include the given file, unless the filename ends in a slash, in which
84 case the whole directory is included. #clear is used to erase a part
85 of the configuration tree. The specified element and all its
86 descendants are erased. (Note that these lines also need to end with a
87 semicolon.)
88
89 The #clear command is the only way to delete a list or a complete
90 scope. Reopening a scope (or using the syntax described below with an
91 appended ::) will not override previously written entries. Options can
92 only be overridden by addressing a new value to them - lists and scopes
93 can't be overridden, only cleared.
94
95 All of the APT tools take an -o option which allows an arbitrary
96 configuration directive to be specified on the command line. The syntax
97 is a full option name (APT::Get::Assume-Yes for instance) followed by
98 an equals sign then the new value of the option. To append a new
99 element to a list, add a trailing :: to the name of the list. (As you
100 might suspect, the scope syntax can't be used on the command line.)
101
102 Note that appending items to a list using :: only works for one item
103 per line, and that you should not use it in combination with the scope
104 syntax (which adds :: implicitly). Using both syntaxes together will
105 trigger a bug which some users unfortunately depend on: an option with
106 the unusual name "::" which acts like every other option with a name.
107 This introduces many problems; for one thing, users who write multiple
108 lines in this wrong syntax in the hope of appending to a list will
109 achieve the opposite, as only the last assignment for this option "::"
110 will be used. Future versions of APT will raise errors and stop working
111 if they encounter this misuse, so please correct such statements now
112 while APT doesn't explicitly complain about them.
113
115 This group of options controls general APT behavior as well as holding
116 the options for all of the tools.
117
118 Architecture
119 System Architecture; sets the architecture to use when fetching
120 files and parsing package lists. The internal default is the
121 architecture apt was compiled for.
122
123 Architectures
124 All Architectures the system supports. For instance, CPUs
125 implementing the amd64 (also called x86-64) instruction set are
126 also able to execute binaries compiled for the i386 (x86)
127 instruction set. This list is used when fetching files and parsing
128 package lists. The initial default is always the system's native
129 architecture (APT::Architecture), and foreign architectures are
130 added to the default list when they are registered via dpkg
131 --add-architecture.
132
133 Compressor
134 This scope defines which compression formats are supported, how
135 compression and decompression can be performed if support for this
136 format isn't built into apt directly and a cost-value indicating
137 how costly it is to compress something in this format. As an
138 example the following configuration stanza would allow apt to
139 download and uncompress as well as create and store files with the
140 low-cost .reversed file extension which it will pass to the command
141 rev without additional commandline parameters for compression and
142 uncompression:
143
144 APT::Compressor::rev {
145 Name "rev";
146 Extension ".reversed";
147 Binary "rev";
148 CompressArg {};
149 UncompressArg {};
150 Cost "10";
151 };
152
153 Build-Profiles
154 List of all build profiles enabled for build-dependency resolution,
155 without the "profile." namespace prefix. By default this list is
156 empty. The DEB_BUILD_PROFILES as used by dpkg-buildpackage(1)
157 overrides the list notation.
158
159 Default-Release
160 Default release to install packages from if more than one version
161 is available. Contains release name, codename or release version.
162 Examples: 'stable', 'testing', 'unstable', 'bullseye', 'bookworm',
163 '4.0', '5.0*'. See also apt_preferences(5).
164
165 Ignore-Hold
166 Ignore held packages; this global option causes the problem
167 resolver to ignore held packages in its decision making.
168
169 Clean-Installed
170 Defaults to on. When turned on the autoclean feature will remove
171 any packages which can no longer be downloaded from the cache. If
172 turned off then packages that are locally installed are also
173 excluded from cleaning - but note that APT provides no direct means
174 to reinstall them.
175
176 Immediate-Configure
177 Defaults to on, which will cause APT to install essential and
178 important packages as soon as possible in an install/upgrade
179 operation, in order to limit the effect of a failing dpkg(1) call.
180 If this option is disabled, APT treats an important package in the
181 same way as an extra package: between the unpacking of the package
182 A and its configuration there can be many other unpack or
183 configuration calls for other unrelated packages B, C etc. If these
184 cause the dpkg(1) call to fail (e.g. because package B's maintainer
185 scripts generate an error), this results in a system state in which
186 package A is unpacked but unconfigured - so any package depending
187 on A is now no longer guaranteed to work, as its dependency on A is
188 no longer satisfied.
189
190 The immediate configuration marker is also applied in the
191 potentially problematic case of circular dependencies, since a
192 dependency with the immediate flag is equivalent to a
193 Pre-Dependency. In theory this allows APT to recognise a situation
194 in which it is unable to perform immediate configuration, abort,
195 and suggest to the user that the option should be temporarily
196 deactivated in order to allow the operation to proceed. Note the
197 use of the word "theory" here; in the real world this problem has
198 rarely been encountered, in non-stable distribution versions, and
199 was caused by wrong dependencies of the package in question or by a
200 system in an already broken state; so you should not blindly
201 disable this option, as the scenario mentioned above is not the
202 only problem it can help to prevent in the first place.
203
204 Before a big operation like dist-upgrade is run with this option
205 disabled you should try to explicitly install the package APT is
206 unable to configure immediately; but please make sure you also
207 report your problem to your distribution and to the APT team with
208 the bug link below, so they can work on improving or correcting the
209 upgrade process.
210
211 Force-LoopBreak
212 Never enable this option unless you really know what you are doing.
213 It permits APT to temporarily remove an essential package to break
214 a Conflicts/Conflicts or Conflicts/Pre-Depends loop between two
215 essential packages. Such a loop should never exist and is a grave
216 bug. This option will work if the essential packages are not tar,
217 gzip, libc, dpkg, dash or anything that those packages depend on.
218
219 Cache-Start, Cache-Grow, Cache-Limit
220 APT uses since version 0.7.26 a resizable memory mapped cache file
221 to store the available information. Cache-Start acts as a hint of
222 the size the cache will grow to, and is therefore the amount of
223 memory APT will request at startup. The default value is 20971520
224 bytes (~20 MB). Note that this amount of space needs to be
225 available for APT; otherwise it will likely fail ungracefully, so
226 for memory restricted devices this value should be lowered while on
227 systems with a lot of configured sources it should be increased.
228 Cache-Grow defines in bytes with the default of 1048576 (~1 MB) how
229 much the cache size will be increased in the event the space
230 defined by Cache-Start is not enough. This value will be applied
231 again and again until either the cache is big enough to store all
232 information or the size of the cache reaches the Cache-Limit. The
233 default of Cache-Limit is 0 which stands for no limit. If
234 Cache-Grow is set to 0 the automatic growth of the cache is
235 disabled.
236
237 Build-Essential
238 Defines which packages are considered essential build dependencies.
239
240 Get
241 The Get subsection controls the apt-get(8) tool; please see its
242 documentation for more information about the options here.
243
244 Cache
245 The Cache subsection controls the apt-cache(8) tool; please see its
246 documentation for more information about the options here.
247
248 CDROM
249 The CDROM subsection controls the apt-cdrom(8) tool; please see its
250 documentation for more information about the options here.
251
253 The Acquire group of options controls the download of packages as well
254 as the various "acquire methods" responsible for the download itself
255 (see also sources.list(5)).
256
257 Check-Date
258 Security related option defaulting to true, enabling time-related
259 checks. Disabling it means that the machine's time cannot be
260 trusted, and APT will hence disable all time-related checks, such
261 as Check-Valid-Until and verifying that the Date field of a release
262 file is not in the future.
263
264 Max-FutureTime
265 Maximum time (in seconds) before its creation (as indicated by the
266 Date header) that the Release file should be considered valid. The
267 default value is 10. Archive specific settings can be made by
268 appending the label of the archive to the option name. Preferably,
269 the same can be achieved for specific sources.list(5) entries by
270 using the Date-Max-Future option there.
271
272 Check-Valid-Until
273 Security related option defaulting to true, as giving a Release
274 file's validation an expiration date prevents replay attacks over a
275 long timescale, and can also for example help users to identify
276 mirrors that are no longer updated - but the feature depends on the
277 correctness of the clock on the user system. Archive maintainers
278 are encouraged to create Release files with the Valid-Until header,
279 but if they don't or a stricter value is desired the Max-ValidTime
280 option below can be used. The Check-Valid-Until option of
281 sources.list(5) entries should be preferred to disable the check
282 selectively instead of using this global override.
283
284 Max-ValidTime
285 Maximum time (in seconds) after its creation (as indicated by the
286 Date header) that the Release file should be considered valid. If
287 the Release file itself includes a Valid-Until header the earlier
288 date of the two is used as the expiration date. The default value
289 is 0 which stands for "valid forever". Archive specific settings
290 can be made by appending the label of the archive to the option
291 name. Preferably, the same can be achieved for specific
292 sources.list(5) entries by using the Valid-Until-Max option there.
293
294 Min-ValidTime
295 Minimum time (in seconds) after its creation (as indicated by the
296 Date header) that the Release file should be considered valid. Use
297 this if you need to use a seldom updated (local) mirror of a more
298 frequently updated archive with a Valid-Until header instead of
299 completely disabling the expiration date checking. Archive specific
300 settings can and should be used by appending the label of the
301 archive to the option name. Preferably, the same can be achieved
302 for specific sources.list(5) entries by using the Valid-Until-Min
303 option there.
304
305 AllowTLS
306 Allow use of the internal TLS support in the http method. If set to
307 false, this completely disables support for TLS in apt's own
308 methods (excluding the curl-based https method). No TLS-related
309 functions will be called anymore.
310
311 PDiffs
312 Try to download deltas called PDiffs for indexes (like Packages
313 files) instead of downloading whole ones. True by default.
314 Preferably, this can be set for specific sources.list(5) entries or
315 index files by using the PDiffs option there.
316
317 Two sub-options to limit the use of PDiffs are also available:
318 FileLimit can be used to specify a maximum number of PDiff files
319 should be downloaded to update a file. SizeLimit on the other hand
320 is the maximum percentage of the size of all patches compared to
321 the size of the targeted file. If one of these limits is exceeded
322 the complete file is downloaded instead of the patches.
323
324 By-Hash
325 Try to download indexes via an URI constructed from a hashsum of
326 the expected file rather than downloaded via a well-known stable
327 filename. True by default, but automatically disabled if the source
328 indicates no support for it. Usage can be forced with the special
329 value "force". Preferably, this can be set for specific
330 sources.list(5) entries or index files by using the By-Hash option
331 there.
332
333 Queue-Mode
334 Queuing mode; Queue-Mode can be one of host or access which
335 determines how APT parallelizes outgoing connections. host means
336 that one connection per target host will be opened, access means
337 that one connection per URI type will be opened.
338
339 Retries
340 Number of retries to perform. If this is non-zero APT will retry
341 failed files the given number of times.
342
343 Source-Symlinks
344 Use symlinks for source archives. If set to true then source
345 archives will be symlinked when possible instead of copying. True
346 is the default.
347
348 http https
349 The options in these scopes configure APT's acquire transports for
350 the protocols HTTP and HTTPS and are documented in the apt-
351 transport-http(1) and apt-transport-https(1) manpages respectively.
352
353 ftp
354 ftp::Proxy sets the default proxy to use for FTP URIs. It is in the
355 standard form of ftp://[[user][:pass]@]host[:port]/. Per host
356 proxies can also be specified by using the form ftp::Proxy::<host>
357 with the special keyword DIRECT meaning to use no proxies. If no
358 one of the above settings is specified, ftp_proxy environment
359 variable will be used. To use an FTP proxy you will have to set the
360 ftp::ProxyLogin script in the configuration file. This entry
361 specifies the commands to send to tell the proxy server what to
362 connect to. Please see
363 /usr/share/doc/apt/examples/configure-index.gz for an example of
364 how to do this. The substitution variables representing the
365 corresponding URI component are $(PROXY_USER), $(PROXY_PASS),
366 $(SITE_USER), $(SITE_PASS), $(SITE) and $(SITE_PORT).
367
368 The option timeout sets the timeout timer used by the method; this
369 value applies to the connection as well as the data timeout.
370
371 Several settings are provided to control passive mode. Generally it
372 is safe to leave passive mode on; it works in nearly every
373 environment. However, some situations require that passive mode be
374 disabled and port mode FTP used instead. This can be done globally
375 or for connections that go through a proxy or for a specific host
376 (see the sample config file for examples).
377
378 It is possible to proxy FTP over HTTP by setting the ftp_proxy
379 environment variable to an HTTP URL - see the discussion of the
380 http method above for syntax. You cannot set this in the
381 configuration file and it is not recommended to use FTP over HTTP
382 due to its low efficiency.
383
384 The setting ForceExtended controls the use of RFC2428 EPSV and EPRT
385 commands. The default is false, which means these commands are only
386 used if the control connection is IPv6. Setting this to true forces
387 their use even on IPv4 connections. Note that most FTP servers do
388 not support RFC2428.
389
390 cdrom
391 For URIs using the cdrom method, the only configurable option is
392 the mount point, cdrom::Mount, which must be the mount point for
393 the CD-ROM (or DVD, or whatever) drive as specified in /etc/fstab.
394 It is possible to provide alternate mount and unmount commands if
395 your mount point cannot be listed in the fstab. The syntax is to
396 put
397
398 /cdrom/::Mount "foo";
399
400 within the cdrom block. It is important to have the trailing slash.
401 Unmount commands can be specified using UMount.
402
403 gpgv
404 For GPGV URIs the only configurable option is gpgv::Options, which
405 passes additional parameters to gpgv.
406
407 CompressionTypes
408 List of compression types which are understood by the acquire
409 methods. Files like Packages can be available in various
410 compression formats. By default the acquire methods can decompress
411 and recompress many common formats like xz and gzip; with this
412 scope the supported formats can be queried, modified as well as
413 support for more formats added (see also APT::Compressor). The
414 syntax for this is:
415
416 Acquire::CompressionTypes::FileExtension "Methodname";
417
418 Also, the Order subgroup can be used to define in which order the
419 acquire system will try to download the compressed files. The
420 acquire system will try the first and proceed with the next
421 compression type in this list on error, so to prefer one over the
422 other type simply add the preferred type first - types not already
423 added will be implicitly appended to the end of the list, so e.g.
424
425 Acquire::CompressionTypes::Order:: "gz";
426
427 can be used to prefer gzip compressed files over all other
428 compression formats. If xz should be preferred over gzip and bzip2
429 the configure setting should look like this:
430
431 Acquire::CompressionTypes::Order { "xz"; "gz"; };
432
433 It is not needed to add bz2 to the list explicitly as it will be
434 added automatically.
435
436 Note that the Dir::Bin::Methodname will be checked at run time. If
437 this option has been set and support for this format isn't directly
438 built into apt, the method will only be used if this file exists;
439 e.g. for the bzip2 method (the inbuilt) setting is:
440
441 Dir::Bin::bzip2 "/bin/bzip2";
442
443 Note also that list entries specified on the command line will be
444 added at the end of the list specified in the configuration files,
445 but before the default entries. To prefer a type in this case over
446 the ones specified in the configuration files you can set the
447 option direct - not in list style. This will not override the
448 defined list; it will only prefix the list with this type.
449
450 The special type uncompressed can be used to give uncompressed
451 files a preference, but note that most archives don't provide
452 uncompressed files so this is mostly only usable for local mirrors.
453
454 GzipIndexes
455 When downloading gzip compressed indexes (Packages, Sources, or
456 Translations), keep them gzip compressed locally instead of
457 unpacking them. This saves quite a lot of disk space at the expense
458 of more CPU requirements when building the local package caches.
459 False by default.
460
461 Languages
462 The Languages subsection controls which Translation files are
463 downloaded and in which order APT tries to display the
464 description-translations. APT will try to display the first
465 available description in the language which is listed first.
466 Languages can be defined with their short or long language codes.
467 Note that not all archives provide Translation files for every
468 language - the long language codes are especially rare.
469
470 The default list includes "environment" and "en". "environment" has
471 a special meaning here: it will be replaced at runtime with the
472 language codes extracted from the LC_MESSAGES environment variable.
473 It will also ensure that these codes are not included twice in the
474 list. If LC_MESSAGES is set to "C" only the Translation-en file (if
475 available) will be used. To force APT to use no Translation file
476 use the setting Acquire::Languages=none. "none" is another special
477 meaning code which will stop the search for a suitable Translation
478 file. This tells APT to download these translations too, without
479 actually using them unless the environment specifies the languages.
480 So the following example configuration will result in the order
481 "en, de" in an English locale or "de, en" in a German one. Note
482 that "fr" is downloaded, but not used unless APT is used in a
483 French locale (where the order would be "fr, de, en").
484
485 Acquire::Languages { "environment"; "de"; "en"; "none"; "fr"; };
486
487 Note: To prevent problems resulting from APT being executed in
488 different environments (e.g. by different users or by other
489 programs) all Translation files which are found in
490 /var/lib/apt/lists/ will be added to the end of the list (after an
491 implicit "none").
492
493 ForceIPv4
494 When downloading, force to use only the IPv4 protocol.
495
496 ForceIPv6
497 When downloading, force to use only the IPv6 protocol.
498
499 MaxReleaseFileSize
500 The maximum file size of Release/Release.gpg/InRelease files. The
501 default is 10MB.
502
503 EnableSrvRecords
504 This option controls if apt will use the DNS SRV server record as
505 specified in RFC 2782 to select an alternative server to connect
506 to. The default is "true".
507
508 AllowInsecureRepositories
509 Allow update operations to load data files from repositories
510 without sufficient security information. The default value is
511 "false". Concept, implications as well as alternatives are detailed
512 in apt-secure(8).
513
514 AllowWeakRepositories
515 Allow update operations to load data files from repositories which
516 provide security information, but these are deemed no longer
517 cryptographically strong enough. The default value is "false".
518 Concept, implications as well as alternatives are detailed in apt-
519 secure(8).
520
521 AllowDowngradeToInsecureRepositories
522 Allow that a repository that was previously gpg signed to become
523 unsigned during an update operation. When there is no valid
524 signature for a previously trusted repository apt will refuse the
525 update. This option can be used to override this protection. You
526 almost certainly never want to enable this. The default is false.
527 Concept, implications as well as alternatives are detailed in apt-
528 secure(8).
529
530 Changelogs::URI scope
531 Acquiring changelogs can only be done if an URI is known from where
532 to get them. Preferable the Release file indicates this in a
533 'Changelogs' field. If this isn't available the Label/Origin field
534 of the Release file is used to check if a
535 Acquire::Changelogs::URI::Label::LABEL or
536 Acquire::Changelogs::URI::Origin::ORIGIN option exists and if so
537 this value is taken. The value in the Release file can be
538 overridden with Acquire::Changelogs::URI::Override::Label::LABEL or
539 Acquire::Changelogs::URI::Override::Origin::ORIGIN. The value
540 should be a normal URI to a text file, except that package specific
541 data is replaced with the placeholder @CHANGEPATH@. The value for
542 it is: 1. if the package is from a component (e.g. main) this is
543 the first part otherwise it is omitted, 2. the first letter of
544 source package name, except if the source package name starts with
545 'lib' in which case it will be the first four letters. 3. The
546 complete source package name. 4. the complete name again and 5. the
547 source version. The first (if present), second, third and fourth
548 part are separated by a slash ('/') and between the fourth and
549 fifth part is an underscore ('_'). The special value 'no' is
550 available for this option indicating that this source can't be used
551 to acquire changelog files from. Another source will be tried if
552 available in this case.
553
555 Especially with the introduction of the apt binary it can be useful to
556 set certain options only for a specific binary as even options which
557 look like they would effect only a certain binary like
558 APT::Get::Show-Versions effect apt-get as well as apt.
559
560 Setting an option for a specific binary only can be achieved by setting
561 the option inside the Binary::specific-binary scope. Setting the option
562 APT::Get::Show-Versions for the apt only can e.g. by done by setting
563 Binary::apt::APT::Get::Show-Versions instead.
564
565 Note that as seen in the DESCRIPTION section further above you can't
566 set binary-specific options on the commandline itself nor in
567 configuration files loaded via the commandline.
568
570 The Dir::State section has directories that pertain to local state
571 information. lists is the directory to place downloaded package lists
572 in and status is the name of the dpkg(1) status file. preferences is
573 the name of the APT preferences file. Dir::State contains the default
574 directory to prefix on all sub-items if they do not start with / or ./.
575
576 Dir::Cache contains locations pertaining to local cache information,
577 such as the two package caches srcpkgcache and pkgcache as well as the
578 location to place downloaded archives, Dir::Cache::archives. Generation
579 of caches can be turned off by setting pkgcache or srcpkgcache to "".
580 This will slow down startup but save disk space. It is probably
581 preferable to turn off the pkgcache rather than the srcpkgcache. Like
582 Dir::State the default directory is contained in Dir::Cache
583
584 Dir::Etc contains the location of configuration files, sourcelist gives
585 the location of the sourcelist and main is the default configuration
586 file (setting has no effect, unless it is done from the config file
587 specified by APT_CONFIG).
588
589 The Dir::Parts setting reads in all the config fragments in lexical
590 order from the directory specified. After this is done then the main
591 config file is loaded.
592
593 Binary programs are pointed to by Dir::Bin. Dir::Bin::Methods
594 specifies the location of the method handlers and gzip, bzip2, lzma,
595 dpkg, apt-get dpkg-source dpkg-buildpackage and apt-cache specify the
596 location of the respective programs.
597
598 The configuration item RootDir has a special meaning. If set, all paths
599 will be relative to RootDir, even paths that are specified absolutely.
600 So, for instance, if RootDir is set to /tmp/staging and
601 Dir::State::status is set to /var/lib/dpkg/status, then the status file
602 will be looked up in /tmp/staging/var/lib/dpkg/status. If you want to
603 prefix only relative paths, set Dir instead.
604
605 The Ignore-Files-Silently list can be used to specify which files APT
606 should silently ignore while parsing the files in the fragment
607 directories. Per default a file which ends with .disabled, ~, .bak or
608 .dpkg-[a-z]+ is silently ignored. As seen in the last default value
609 these patterns can use regular expression syntax.
610
612 When APT is used as a dselect(1) method several configuration
613 directives control the default behavior. These are in the DSelect
614 section.
615
616 Clean
617 Cache Clean mode; this value may be one of always, prompt, auto,
618 pre-auto and never. always and prompt will remove all packages
619 from the cache after upgrading, prompt (the default) does so
620 conditionally. auto removes only those packages which are no
621 longer downloadable (replaced with a new version for instance).
622 pre-auto performs this action before downloading new packages.
623
624 options
625 The contents of this variable are passed to apt-get(8) as command
626 line options when it is run for the install phase.
627
628 Updateoptions
629 The contents of this variable are passed to apt-get(8) as command
630 line options when it is run for the update phase.
631
632 PromptAfterUpdate
633 If true the [U]pdate operation in dselect(1) will always prompt to
634 continue. The default is to prompt only on error.
635
637 Several configuration directives control how APT invokes dpkg(1). These
638 are in the DPkg section.
639
640 options
641 This is a list of options to pass to dpkg(1). The options must be
642 specified using the list notation and each list item is passed as a
643 single argument to dpkg(1).
644
645 Path
646 This is a string that defines the PATH environment variable used
647 when running dpkg. It may be set to any valid value of that
648 environment variable; or the empty string, in which case the
649 variable is not changed.
650
651 Pre-Invoke, Post-Invoke
652 This is a list of shell commands to run before/after invoking
653 dpkg(1). Like options this must be specified in list notation. The
654 commands are invoked in order using /bin/sh; should any fail APT
655 will abort.
656
657 Pre-Install-Pkgs
658 This is a list of shell commands to run before invoking dpkg(1).
659 Like options this must be specified in list notation. The commands
660 are invoked in order using /bin/sh; should any fail APT will abort.
661 APT will pass the filenames of all .deb files it is going to
662 install to the commands, one per line on the requested file
663 descriptor, defaulting to standard input.
664
665 Version 2 of this protocol sends more information through the
666 requested file descriptor: a line with the text VERSION 2, the APT
667 configuration space, and a list of package actions with filename
668 and version information.
669
670 Each configuration directive line has the form key=value. Special
671 characters (equal signs, newlines, nonprintable characters,
672 quotation marks, and percent signs in key and newlines,
673 nonprintable characters, and percent signs in value) are %-encoded.
674 Lists are represented by multiple key::=value lines with the same
675 key. The configuration section ends with a blank line.
676
677 Package action lines consist of five fields in Version 2: package
678 name (without architecture qualification even if foreign), old
679 version, direction of version change (< for upgrades, > for
680 downgrades, = for no change), new version, action. The version
681 fields are "-" for no version at all (for example when installing a
682 package for the first time; no version is treated as earlier than
683 any real version, so that is an upgrade, indicated as - < 1.23.4).
684 The action field is "**CONFIGURE**" if the package is being
685 configured, "**REMOVE**" if it is being removed, or the filename of
686 a .deb file if it is being unpacked.
687
688 In Version 3 after each version field follows the architecture of
689 this version, which is "-" if there is no version, and a field
690 showing the MultiArch type "same", "foreign", "allowed" or "none".
691 Note that "none" is an incorrect typename which is just kept to
692 remain compatible, it should be read as "no" and users are
693 encouraged to support both.
694
695 The version of the protocol to be used for the command cmd can be
696 chosen by setting DPkg::Tools::options::cmd::Version accordingly,
697 the default being version 1. If APT isn't supporting the requested
698 version it will send the information in the highest version it has
699 support for instead.
700
701 The file descriptor to be used to send the information can be
702 requested with DPkg::Tools::options::cmd::InfoFD which defaults to
703 0 for standard input and is available since version 0.9.11. Support
704 for the option can be detected by looking for the environment
705 variable APT_HOOK_INFO_FD which contains the number of the used
706 file descriptor as a confirmation.
707
708 Run-Directory
709 APT chdirs to this directory before invoking dpkg(1), the default
710 is /.
711
712 Build-options
713 These options are passed to dpkg-buildpackage(1) when compiling
714 packages; the default is to disable signing and produce all
715 binaries.
716
717 DPkg::ConfigurePending
718 If this option is set APT will call dpkg --configure --pending to
719 let dpkg(1) handle all required configurations and triggers. This
720 option is activated by default, but deactivating it could be useful
721 if you want to run APT multiple times in a row - e.g. in an
722 installer. In this scenario you could deactivate this option in all
723 but the last run.
724
726 APT::Periodic and APT::Archives groups of options configure behavior of
727 apt periodic updates, which is done by the
728 /usr/lib/apt/apt.systemd.daily script. See the top of this script for
729 the brief documentation of these options.
730
732 Enabling options in the Debug:: section will cause debugging
733 information to be sent to the standard error stream of the program
734 utilizing the apt libraries, or enable special program modes that are
735 primarily useful for debugging the behavior of apt. Most of these
736 options are not interesting to a normal user, but a few may be:
737
738 • Debug::pkgProblemResolver enables output about the decisions made
739 by dist-upgrade, upgrade, install, remove, purge.
740
741 • Debug::NoLocking disables all file locking. This can be used to run
742 some operations (for instance, apt-get -s install) as a non-root
743 user.
744
745 • Debug::pkgDPkgPM prints out the actual command line each time that
746 apt invokes dpkg(1).
747
748 • Debug::IdentCdrom disables the inclusion of statfs data in CD-ROM
749 IDs.
750
751 A full list of debugging options to apt follows.
752
753 Debug::Acquire::cdrom
754 Print information related to accessing cdrom:// sources.
755
756 Debug::Acquire::ftp
757 Print information related to downloading packages using FTP.
758
759 Debug::Acquire::http
760 Print information related to downloading packages using HTTP.
761
762 Debug::Acquire::https
763 Print information related to downloading packages using HTTPS.
764
765 Debug::Acquire::gpgv
766 Print information related to verifying cryptographic signatures
767 using gpg.
768
769 Debug::aptcdrom
770 Output information about the process of accessing collections of
771 packages stored on CD-ROMs.
772
773 Debug::BuildDeps
774 Describes the process of resolving build-dependencies in apt-
775 get(8).
776
777 Debug::Hashes
778 Output each cryptographic hash that is generated by the apt
779 libraries.
780
781 Debug::IdentCDROM
782 Do not include information from statfs, namely the number of used
783 and free blocks on the CD-ROM filesystem, when generating an ID for
784 a CD-ROM.
785
786 Debug::NoLocking
787 Disable all file locking. For instance, this will allow two
788 instances of “apt-get update” to run at the same time.
789
790 Debug::pkgAcquire
791 Log when items are added to or removed from the global download
792 queue.
793
794 Debug::pkgAcquire::Auth
795 Output status messages and errors related to verifying checksums
796 and cryptographic signatures of downloaded files.
797
798 Debug::pkgAcquire::Diffs
799 Output information about downloading and applying package index
800 list diffs, and errors relating to package index list diffs.
801
802 Debug::pkgAcquire::RRed
803 Output information related to patching apt package lists when
804 downloading index diffs instead of full indices.
805
806 Debug::pkgAcquire::Worker
807 Log all interactions with the sub-processes that actually perform
808 downloads.
809
810 Debug::pkgAutoRemove
811 Log events related to the automatically-installed status of
812 packages and to the removal of unused packages.
813
814 Debug::pkgDepCache::AutoInstall
815 Generate debug messages describing which packages are being
816 automatically installed to resolve dependencies. This corresponds
817 to the initial auto-install pass performed in, e.g., apt-get
818 install, and not to the full apt dependency resolver; see
819 Debug::pkgProblemResolver for that.
820
821 Debug::pkgDepCache::Marker
822 Generate debug messages describing which packages are marked as
823 keep/install/remove while the ProblemResolver does his work. Each
824 addition or deletion may trigger additional actions; they are shown
825 indented two additional spaces under the original entry. The format
826 for each line is MarkKeep, MarkDelete or MarkInstall followed by
827 package-name <a.b.c -> d.e.f | x.y.z> (section) where a.b.c is the
828 current version of the package, d.e.f is the version considered for
829 installation and x.y.z is a newer version, but not considered for
830 installation (because of a low pin score). The later two can be
831 omitted if there is none or if it is the same as the installed
832 version. section is the name of the section the package appears
833 in.
834
835 Debug::pkgDPkgPM
836 When invoking dpkg(1), output the precise command line with which
837 it is being invoked, with arguments separated by a single space
838 character.
839
840 Debug::pkgDPkgProgressReporting
841 Output all the data received from dpkg(1) on the status file
842 descriptor and any errors encountered while parsing it.
843
844 Debug::pkgOrderList
845 Generate a trace of the algorithm that decides the order in which
846 apt should pass packages to dpkg(1).
847
848 Debug::pkgPackageManager
849 Output status messages tracing the steps performed when invoking
850 dpkg(1).
851
852 Debug::pkgPolicy
853 Output the priority of each package list on startup.
854
855 Debug::pkgProblemResolver
856 Trace the execution of the dependency resolver (this applies only
857 to what happens when a complex dependency problem is encountered).
858
859 Debug::pkgProblemResolver::ShowScores
860 Display a list of all installed packages with their calculated
861 score used by the pkgProblemResolver. The description of the
862 package is the same as described in Debug::pkgDepCache::Marker
863
864 Debug::sourceList
865 Print information about the vendors read from
866 /etc/apt/vendors.list.
867
868 Debug::RunScripts
869 Display the external commands that are called by apt hooks. This
870 includes e.g. the config options DPkg::{Pre,Post}-Invoke or
871 APT::Update::{Pre,Post}-Invoke.
872
874 /usr/share/doc/apt/examples/configure-index.gz is a configuration file
875 showing example values for all possible options.
876
878 /etc/apt/apt.conf
879 APT configuration file. Configuration Item: Dir::Etc::Main.
880
881 /etc/apt/apt.conf.d/
882 APT configuration file fragments. Configuration Item:
883 Dir::Etc::Parts.
884
886 apt-cache(8), apt-config(8), apt_preferences(5).
887
889 APT bug page[1]. If you wish to report a bug in APT, please see
890 /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.
891
893 Jason Gunthorpe
894
895 APT team
896
897 Daniel Burrows <dburrows@debian.org>
898 Initial documentation of Debug::*.
899
901 1. APT bug page
902 http://bugs.debian.org/src:apt
903
904
905
906APT 2.3.5 04 April 2019 APT.CONF(5)