Debian

How to Reconfigure Installed Packages on Debian 11

Sometimes you might need to reconfigure the installed packages on the Debian system. The dpkg-reconfigure is the powerful command line tool for the configuration of the installed packages on Debian 11. It is one of the tools that is offered by dpkg because of its versatile package management system on Debian. The reconfiguration of each package is managed under the debconf.

In this tutorial, we will discuss the reconfiguration of installed packages on Debian 11.

How to Reconfigure Installed Packages on Debian 11

Before starting the reconfiguration, use the debcon-show command with the package name to view the configuration of the installed packages:

sudo debconf-show <package_name>

I am checking the list of the installed configuration of the package phpmyadmin:

sudo debconf-show phpmyadmin

You can reconfigure the package with the dpkg-reconfigure and package name. Since I am going with the phpmyadmin configuration, the command will look like this:

sudo dpkg-reconfigure phpmyadmin

Once you have executed the above command, the reconfiguration of the installed package will be started.

In the case of phpmyadmin, the following window will pop up, click on the OK to continue:

You will be asked a series of questions, choose the answers according to what you want and finish the process of reconfiguration:

Once the process is finished, you will see some useful information on the terminal related to the configuration settings you have just made.

To get the set of the minimum questions, use the -p flag with the reconfiguration command as follows:

sudo dpkg-reconfigure -p critical phpmyadmin

In some cases, the installed package might be broken, use -f to force the reconfiguration.

sudo dpkg-reconfigure -f package_name

For more information related to the dpkg-reconfiguration, open the manual page via the following command:

man dpkg-reconfigure

Bottom Line

You can use the dpkg reconfigure utility for the reconfiguration of the installed packages on Debian. You can also reconfigure the packages that are broken and corrupt through this tool. It will ask the questions just like when the package was first installed. In the above guide, we have used the dpkg utility to reconfigure the phpmyadmin as an example. Follow the guide to reconfigure the installed package on Debian 11.

About the author

Zainab Rehman

I'm an author by profession. My interest in the internet world motivates me to write for Linux Hint and I'm here to share my knowledge with others.