APT-CONFIG(8)

๐ŸŽ€ APT-CONFIG(8) ๐ŸŽ€

okay so this is a page from the APT manual, and yes bestie, it's literally called apt-config. Buckle up ๐Ÿ’–


โœจ NAME โœจ

apt-config โ€” the APT Configuration Query program. she queries config, that's her whole job ๐Ÿ’…


โœจ SYNOPSIS โœจ

apt-config [--empty] [--format '%f "%v";%n'] [-o=config_string]
           [-c=config_file] {shell | dump | {-v | --version} |
           {-h | --help}}

โœจ DESCRIPTION โœจ

so apt-config is an internal program โ€” like, she's not out here for the general public, she's the backstage crew ๐Ÿซถ. Various portions of the APT suite use her to provide consistent configurability. She accesses the main configuration file /etc/apt/apt.conf in a manner that's easy to use for scripted applications. lowkey iconic.

Unless you give her the -h or --help option, one of the commands below must be present (no cap, she needs to know what you want):

  • shell โ€” shell is used to access the configuration information from a shell script. You give it pairs of arguments: the first one is a shell variable, the second is the configuration value to query. As output it lists shell assignment commands for each value present. In a shell script you should use it like this:
OPTS="-f"
RES=`apt-config shell OPTS MyApp::options`
eval $RES

This sets the shell environment variable $OPTS to the value of MyApp::options with a default of -f. slay ๐Ÿ’–

The configuration item may be postfixed with a /[fdbi]:

  • f returns file names
  • d returns directories
  • b returns true or false
  • i returns an integer

Each of those returns is normalized and verified internally. she checks her work, periodt โœจ

  • dump โ€” just show the contents of the configuration space. that's it. that's the whole vibe ๐Ÿ™ˆ

โœจ OPTIONS โœจ

All command line options may be set using the configuration file, and the descriptions indicate the configuration option to set. For boolean options you can override the config file by using something like -f-, --no-f, -f=no or several other variations. so many variations, pick your fave ๐ŸŒธ

  • --empty โ€” Include options which have an empty value. This is the default, so use --no-empty to remove them from the output.
  • --format '%f "%v";%n' โ€” Defines the output of each config option. Let me break it down bestie:
    • %t gets replaced with its individual name
    • %f gets replaced with its full hierarchical name
    • %v gets replaced with its value
    • Use uppercase letters and special characters in the value and it'll be encoded, to ensure it can e.g. be safely used in a quoted-string as defined by RFC822. security queen ๐Ÿ”ฅ
    • Additionally %n gets replaced by a newline, and %N by a tab
    • A % can be printed by using %% (yes, escape your escapes)
  • -h, --help โ€” Show a short usage summary. the "help me help you" option ๐Ÿซถ
  • -v, --version โ€” Show the program version.
  • --audit โ€” Show audit (and notice) messages. This overrides the quiet option, but only for notice messages, not progress ones. okay so she's loud about notices and silent about progress, we respect the boundaries ๐Ÿ’…
  • -c, --config-file โ€” Configuration File; specify a configuration file to use. The program will read the default configuration file and then this configuration file. If configuration settings need to be set before the default configuration files are parsed, specify a file with the APT_CONFIG environment variable. See apt.conf(5) for syntax information.
  • -o, --option โ€” Set a Configuration Option; this will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar. -o and --option can be used multiple times to set different options. stack 'em ๐Ÿ“
  • --cli-version โ€” Requests a specific CLI version. This is a pattern that takes a MAJOR.MINOR version. You may omit the MINOR version, in which case the latest supported minor level will be used.

Version tracks are presented as follows: the version 3.2 has equivalent versions 0.32, 1.22, and 2.12, implementing new features for their specified major versions.

A special case is the X.9 version pattern: a version like 2.9 is followed by 3.0, but 2.10 follows directly on 2.8 โ€” given that we use odd version numbers as development series (2.9 is the 3.0 development series). math girlie hours ๐Ÿงš

This feature has been introduced in APT 3.1.10, and replaces the binary-specific configuration. You may use the APT::Version to similar effect on older binaries โ€” for example, use -o APT::Version=2 to make apt(8) behave like the 2.x series.

The default value is the current APT version for apt(8) and 0.(10 * major + minor) for the classic commands. The 0.X series is soft-deprecated and the other commands will roll over to the 2.x series in the future. โš ๏ธ heads up, she's evolving โš ๏ธ

  • --no-color, --color โ€” Turn colors on or off. Colors are on by default on supported terminals for apt(8) and can also be disabled using the NO_COLOR or APT_NO_COLOR environment variables, or further configured by the APT::Color configuration option and scope โ€” see apt.conf(5) for information on that. aesthetic customization unlocked ๐ŸŒˆ

โœจ SEE ALSO โœจ

apt.conf(5)


โœจ DIAGNOSTICS โœจ

apt-config returns zero on normal operation, and decimal 100 on error. bestie either ate or she didn't ๐Ÿ’€


โœจ BUGS โœจ

APT bug page[1]. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command. she welcomes feedback, fr fr ๐Ÿ’œ


โœจ AUTHORS โœจ

Jason Gunthorpe

APT team


โœจ NOTES โœจ

  1. APT bug page https://bugs.debian.org/src:apt

ok so that's the whole page bestie, you're officially an apt-config expert, no cap, iykyk ๐Ÿ‘‘

๐ŸŽ€ this has been APT 3.3.5, dated 30 November 2013 โ€” signing off from the APT-CONFIG(8) manual page, love u, go query some configs ๐Ÿ’–โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from
  • arch rolling: apt 3.3.5-1 ยท BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND MIT
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms