debconf-set-selections
Pre-configure Debian package installation questions
SYNOPSIS
debconf-set-selections [options] < selections
PARAMETERS
--help, -h, -?
Display usage summary.
--version, -v, -V
Display version information.
DESCRIPTION
debconf-set-selections is a Debian utility for setting debconf database values non-interactively. Debconf manages package configuration questions during installation. This command allows preseeding answers from standard input, enabling automated deployments without user prompts.
Input lines follow formats like package question value (e.g., postfix postfix/main_mailer_type select Internet Site) or package question seen value to mark as viewed. It also supports full debconf dumps from debconf-get-selections.
Commonly used in scripts, chroots, or preseeding files for Debian/Ubuntu installs with DEBIAN_FRONTEND=noninteractive apt-get install. After preseeding, run dpkg-preconfigure or proceed with installs. Ideal for build servers, cloud images, or mass deployments, but requires precise values to avoid config errors.
CAVEATS
Permanently alters debconf database; wrong values cause install failures. Test thoroughly. Ignored by interactive frontends. Run before package configs; root privileges often needed. Not for clearing all preselections easily.
INPUT FORMAT
Basic: package question value
Mark seen: package question seen value
Supports full debconf-get-selections output (Template/Request records).
Example:
echo 'sshd ssh/install-sshd boolean true' | debconf-set-selections
TYPICAL USAGE
cat preseeds.txt | debconf-set-selections
DEBIAN_FRONTEND=noninteractive apt-get -y install package
HISTORY
Developed by Joey Hess for debconf (circa 2000) to support automated Debian installs. Integral to preseeding since woody (2002); enhanced for full dump compatibility in later versions.
SEE ALSO
debconf-get-selections(1), dpkg-preconfigure(8), dpkg-reconfigure(8), debconf(7)


