Packages and backups

The dpkg-reconfigure command

Asks again the configuration questions of a package that is already installed.

Syntax

sudo dpkg-reconfigure <paquete>Try it in the terminal →

Most useful options

-f tipoChooses the interface used to ask the questions (also --frontend=type)
-p valorShows the questions of that priority or higher. By default the low priority is forced, so all of them appear
--default-priorityUses each question's own priority instead of forcing the low one
-uAsks only the questions that have never been shown before
--forceReconfigures even if the package is broken or inconsistent. Use it with care
--no-reloadDoes not reload the templates. It can leave a damaged templates database unrepaired

Copy-ready examples

$ sudo dpkg-reconfigure tzdataasks the system timezone again.
$ sudo dpkg-reconfigure -u tzdataasks only what you have not seen before.
$ sudo dpkg-reconfigure --frontend=dialog localesreconfigures the locales with the dialog interface.
$ sudo dpkg-reconfigure debconfpermanently changes the default debconf interface.

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • It does not show the current configuration, it asks the questions again. To see what is stored, use debconf-show.
  • --force is for packages in a broken or inconsistent state. If you do not know why they are, fix that first.
  • If debconf uses the noninteractive frontend, dpkg-reconfigure uses the dialog one anyway, so it will still ask you.

Differences from similar commands

  • debconf-show: shows the saved configuration of a package, without asking anything. dpkg-reconfigure asks again.
  • apt: installs, upgrades and removes packages. dpkg-reconfigure does not install or remove anything: it only reviews the configuration.

Related commands

FAQ

Does answering change anything on the system?

The answers are stored in debconf. You can review what is stored with debconf-show, and what each answer does depends on the package.

Why does it ask again things I already answered?

Because by default it shows every question. With -u only the ones you have never seen appear.

Does it reinstall a package?

No: it only asks the configuration questions again. Reinstalling is a different operation, done with apt or dpkg.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course