Home

debconfsetselections

debconf-set-selections is a command-line utility from the debconf package used on Debian-based systems to pre-seed answers to debconf prompts during package configuration. By populating the debconf database with predefined responses, it enables automated or non-interactive installations and upgrades.

Format and types: The tool reads lines in the form: package-name question-name type value. Common types include

- mysql-server mysql-server/root_password password my-secret-pw

- mysql-server mysql-server/root_password_again password my-secret-pw

- postfix postfix/main_mailer_type select Internet Site

- some-package some-feature/enable boolean true

Usage: Input can be provided directly from a file or here-document. For example:

debconf-set-selections < preseed.txt

or

debconf-set-selections << 'EOF'

package-name question-name type value

EOF

Application: Debconf-set-selections is typically used in automated deployment workflows. When used in conjunction with non-interactive installations

Notes: The command updates the debconf database, and later installations will use the supplied values if

boolean,
string,
password,
select,
and
multiselect.
Examples:
(for
example,
with
DEBIAN_FRONTEND=noninteractive
and
apt/dpkg),
it
ensures
that
prompts
receive
predefined
answers
and
do
not
halt
installation.
they
correspond
to
the
respective
templates.
If
a
template
is
not
relevant
to
a
given
package,
it
will
be
ignored.
To
modify
configurations
after
installation,
you
can
use
dpkg-reconfigure
or
related
debconf
tools.
For
viewing
current
preseeded
values,
there
is
a
separate
utility
debconf-get-selections.