14

After upgrading to 16.04, I tried to use that command, but it seems that dpkg-reconfigure (or dpkg --reconfigure) doesn't understand the option --all.

Is it still available? If not, is there an equivalent command?

3 Answers3

21

Not equivalent, but probably what you are looking for if you want to be sure, everything is at least somehow configured:

dpkg --configure -a
Pablo Bianchi
  • 17,552
axm
  • 446
15

You can try this script:

for i in `dpkg -l | grep '^ii' | awk '{print $2}'`; do
    echo $i; sudo dpkg-reconfigure $i;
done

It reconfigures all installed packages.

  • This doesn't work if any of the packages have a full screen dialog pop up where you have to choose "Yes" or "No". The keyboard doesn't select the options. – Mike Sep 06 '22 at 23:38
  • @Mike, when you run sudo dpkg-reconfigure just for the package showing the screen dialog, does the keyboard work correctly that way? – Michal Fapso Sep 16 '22 at 20:06
  • Yes, it does... – Mike Sep 17 '22 at 06:02
  • 1
    Thanks, @Mike. And when you try these: 1. (sudo dpkg-reconfigure YOUR_PACKAGE) when the command is enclosed in braces, or 2. (sudo dpkg-reconfigure YOUR_PACKAGE) 2>&1, or 3. (sudo dpkg-reconfigure YOUR_PACKAGE) 2>&1 | tee dpkg-reconfigure.log, which of those work and which don't? – Michal Fapso Sep 18 '22 at 07:05
  • 1
    The problem seems to be the output redirection. This works: (for i in \dpkg -l | grep '^ii' | awk '{print $2}'`; do echo $i; sudo dpkg-reconfigure $i; done;)` – RandomInsano Mar 11 '25 at 20:17
  • Thanks, @RandomInsano, I've updated my answer using the fix you've suggested. – Michal Fapso Mar 12 '25 at 21:37
2

No, dpkg-reconfigure on 16.04 (but also on 15.10) does not have the option --all any more, although it was present in 14.04 (not sure about 14.10).

You could have verified that yourself by checking the command's manpage:

man dpkg-reconfigure

On a 16.04 (or 15.10) system, this manual page will not list an --all argument, while on 14.04 one is present.

If you don't have those systems at hand, just read the online manpages: 16.04 - 15.10 - 14.04
(note for future readers: if one of the linked releases has reached end-of-life by the time you read this, the link will redirect to the latest release's manpage instead of showing the old, archived version)

Byte Commander
  • 110,523