3

dpkg-reconfigure gives a way to set options for installed packages in a "user-friendly" way (e.g. not editing files but selecting from dialogs).

How can I find out what package has such options? e.g. "dpkg-reconfigure tzdata" does have it while "dpkg-reconfigure nano" does not.

What's the correct argument/package to add an additional apt-mirror via dpkg-reconfigure the "dialog-way"?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
chris01
  • 519
  • 1
  • 9
  • 22
  • Whether `dpkg-reconfigure ` does anything worthwhile is up to the maintainer scripts involved (`/var/lib/dpkg/info/.postinst` usually). – muru Jun 20 '18 at 06:50

2 Answers2

7

Dialogs in Debian package configuration scripts are typically handled by debconf; packages which support this will have matching .config and .templates files in /var/lib/dpkg/info (e.g. /var/lib/dpkg/info/tzdata.config and /var/lib/dpkg/info/tzdata.templates). (This provides other benefits too, such as simple support for pre-seeding.)

Running dpkg-reconfigure runs a package’s postinst maintainer script in configure mode, so what happens when you do so really depends on what the maintainer provides. Most packages are designed to install silently so they don’t provide interactive configuration via dpkg-reconfigure.

Additional apt mirrors are configured by an installer module, not a postinst script, and as far as I know it isn’t available after installation.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
3

The following command give you the package list that can be used by dpkg-reconfigure. You need to install debconf-utils package first.

$ debconf-get-selections | grep -v ^# | cut -f 2 | cut -d / -f 1 | sort | uniq