dpkg-reconfigure – Reconfigure an installed package in Debian Linux

The dpkg-reconfigure command is a powerful tool in Debian Linux that allows you to reconfigure an already installed package. This command is useful when you need to change the configuration of a package after it has been installed. It allows you to modify the settings of a package without having to remove and reinstall it.


The syntax of the dpkg-reconfigure command is as follows:

dpkg-reconfigure [options] package

Here, package is the name of the package you want to reconfigure. The dpkg-reconfigure command will then launch a series of prompts that allow you to change the configuration of the package.

For example, to reconfigure the apache2 package, you would use the following command:

sudo dpkg-reconfigure apache2

This will launch a series of prompts that allow you to change the configuration of the apache2 package.


The following table lists the available options for the dpkg-reconfigure command:

Option Description
-f, –frontend Specify the frontend to use for the reconfiguration. Valid options include dialog, readline, gnome, kde, and editor.
-p, –priority Set the priority of the questions asked during reconfiguration. Valid options include low, medium, and high.
-u, –unseen-only Only show questions that have not been seen before.
-a, –all Reconfigure all installed packages.
–default-priority Set the default priority for questions. Valid options include low, medium, and high.

Troubleshooting tips

Here are some tips for troubleshooting common issues with the dpkg-reconfigure command:

  • If you receive an error message that says the package is not installed, make sure you have the correct package name and that it is installed on your system.
  • If you are not sure which package to reconfigure, you can use the dpkg -l command to list all installed packages on your system.
  • If you are having trouble with the prompts during reconfiguration, try using a different frontend by specifying the -f option.


  • The dpkg-reconfigure command can be used to reconfigure any package that has a configuration script in the /etc directory.
  • If you make a mistake during reconfiguration, you can always run the command again to make additional changes.
  • Reconfiguring a package may require root privileges, so make sure to use the sudo command when necessary.