bash: dpkg-reconfigure: command not found

This is the behaviour if you switched to root using su instead of su -, for example. In Debian 10 dpkg-reconfigure is located in /usr/sbin/, so it has to be in the PATH.

Compare these two PATH-variables:

user1@d10test:~$ su root
Password: 
root@d10test:/home/user1/# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
root@d10test:/home/user1/# exit

user1@d10test:~$ su - root
Password: 
root@d10test:/home/user1/# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/bin:/bin

There you'll see that the environment set bei su does not include sbin in the PATH, so dpkg-reconfigure won't be found.

debconf should be installed by default, though.


From the wiki

https://wiki.debian.org/NewInBuster

Apparently I didn't read the other release notes

Changes The su command in buster is provided by the util-linux source package, instead of the shadow source package, and no longer alters the PATH variable by default. This means that after doing su, your PATH may not contain directories like /sbin, and many system administration commands will fail. There are several workarounds:

Use su - instead; this launches a login shell, which forces PATH to be changed, but also changes everything else including the working directory.

Use sudo instead. sudo still runs commands with an altered PATH variable.

Put ALWAYS_SET_PATH yes in /etc/login.defs to get an approximation of the old behavior.

Put the system administration directories (/sbin, /usr/sbin, /usr/local/sbin) in your regular account's PATH (see EnvironmentVariables for help with this).

thanks to my friend falso for making me use google more carefully


Debian 10 has not removed dpkg-reconfigure at all. It is present and part of the debconf package, which should have already been installed on your system. If it is missing from your system, then you need to install (or reinstall) the debconf package.