How to list broken packages in console

You can list broken packages :

dpkg -l | grep ^..r 

r state (on the third field) means: reinst-required (package broken, reinstallation required)

dpkg fields explanation


It seems that nobody has recommended this:

sudo apt-get check

also for more info try

apt-get --help

To get the list of partially installed packages (with architecture information) preceded by their states, one by line, run

dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package}\n' | grep -E ^.[^nci]

See man dpkg-query for information about the states etc. (I suppose the Reinst-required i.e. R flag can not appear with states n, c or i. If it could, the extended regular expression in grep command should be modified.)