Linux "apt-config" Command Line Options and Examples
APT Configuration Query program

apt-config is an internal program used by various portions of the APT suite to provide consistent configurability. It accesses the main configuration file /etc/apt/apt.conf in a manner that is easy to use for scripted applications.


Usage:

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




Command Line Options:

--empty
Include options which have an empty value. This is the default, so use --no-empty to remove them from the output.
apt-config --empty ...
--format
Defines the output of each config option. %t will be replaced with its individual name, %f with its full hierarchical name and %vwith its value. Use uppercase letters and special characters in the value will be encoded to ensure that it can e.g. be safelyused in a quoted-string as defined by RFC822. Additionally %n will be replaced by a newline, and %N by a tab. A % can be printedby using %%.
apt-config --format ...
-h
Show a short usage summary.
apt-config -h ...
-v
Show the program version.
apt-config -v ...
-c
Configuration File; Specify a configuration file to use. The program will read the default configuration file and then thisconfiguration file. If configuration settings need to be set before the default configuration files are parsed specify a filewith the APT_CONFIG environment variable. See apt.conf(5) for syntax information.
apt-config -c ...
-o
Set a Configuration Option; This will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar. -o and --option canbe used multiple times to set different options.
apt-config -o ...