1

When something goes wrong in the middle of a dpkg configuration we need to run dpkg --configure -a before installing a new package.

Is there a way to check if "dpkg --configure -a" needs to be run? Any files we can inspect?

2 Answers2

2

Check the output of dpkg -l|grep $packagename . In the first column, you can see the status of the package. To understand what these flags mean, you can check the output of dpkg -l|head -3. First letter is desired state, the second letter is the package status.

For example, the status flag iF means installed, half-configured. In this case, you will need to issue a dpkg --configure for the package.

etagenklo
  • 5,694
  • 1
  • 25
  • 31
0
dpkg -l | grep -E '^[A-Za-z][A-Z]'

If you have any output, it means you need to dpkg --configure -a.