debconf-communicate
Communicate with the debconf configuration system
SYNOPSIS
debconf-communicate [-f frontend | --frontend=frontend] [--config-file=file] database
PARAMETERS
-f frontend, --frontend=frontend
Specify the Debconf frontend to use (e.g., noninteractive, readline)
--config-file=file
Load Debconf configuration from the given file instead of /var/cache/debconf/config
DESCRIPTION
The debconf-communicate command enables scripts to interact with Debconf databases without an interactive frontend. Debconf is Debian's configuration management system, storing package configuration values in a key-value database.
It reads commands from standard input (e.g., GET, SET, INPUT, PROGRESS) and sends them to the specified database, outputting responses to standard output. This is essential for maintainer scripts in Debian packages (postinst, preinst, etc.) during automated installations, upgrades, or reconfiguration, ensuring non-interactive operation.
Common use cases include querying user choices (GET), setting defaults (SET), displaying progress meters, or registering questions. The database argument identifies the target, often configdb or a package-specific one. It supports Debconf's protocol for capabilities like multilingual text and priority-based questions.
This tool ensures reproducible builds and headless server deployments by decoupling configuration from user prompts.
CAVEATS
Reads commands exclusively from stdin; outputs to stdout. Database must exist and be accessible. Not for direct user interaction—use dpkg-reconfigure instead. Sensitive to exact command syntax per debconf protocol.
EXAMPLE USAGE
echo 'GET pkg/question' | debconf-communicate configdb
Outputs the value of pkg/question from configdb.
debconf-communicate progress <<EOF
0
foo progress title
50
foo progress info Doing stuff...
100
EOF
SUPPORTED COMMANDS
Core: GET, SET, INPUT, REGISTER, UNREGISTER, TITLE, PROGRESS. Full list and protocol in debconf(7).
HISTORY
Developed by Joey Hess as part of the debconf package (first released ~1999-2000). Evolved with Debian's package system for reliable non-interactive config; now in cdebconf for C implementation.
SEE ALSO
debconf(7), dpkg-preconfigure(8), dpkg-reconfigure(8)


