LinuxCommandLibrary

apt-config

Query and display APT configuration settings.

TLDR

Show APT configuration

$ apt-config dump
copy
Show specific option
$ apt-config dump | grep [Dir::Cache]
copy
Show configuration in shell format
$ apt-config shell VAR [Dir::Cache]
copy

SYNOPSIS

apt-config [-o option] [-c config] command

DESCRIPTION

apt-config displays APT's configuration values. It shows the effective configuration from all sources including /etc/apt/apt.conf, /etc/apt/apt.conf.d/, and command-line options.
This is useful for debugging APT behavior, understanding which settings are active, and scripting with APT configuration values.

PARAMETERS

dump

Show entire configuration
shell var option
Output shell-compatible variable assignment
-o option
Set configuration option
-c file
Read additional configuration file

CONFIGURATION

/etc/apt/apt.conf

Main APT configuration file.
/etc/apt/apt.conf.d/
Directory for drop-in configuration fragments, processed in alphanumeric order.

CAVEATS

Configuration is hierarchical; lower-level options override higher ones. Command-line options override file settings. Some options require specific APT versions.

HISTORY

apt-config has been part of APT since early versions, providing programmatic access to APT's configuration system.

SEE ALSO

apt.conf(5), apt(8), apt-get(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community