Listing Debian Packages Not Fully Installed – Step-by-Step

debiandpkg

This is with reference to "sudo: apt-get: command not found." after removing some packages. This user managed to break his system by installing some packages from wheezy on a squeeze system – not sure why or how. In any case, he has at least two packages which are not fully installed, and are in the state iU (i.e. unpacked only). What is an efficient way to list all packages that are not fully installed, or, putting it differently, partially installed?

This seems like something that might have already been asked, but a quick search did not uncover anything. If it is a duplicate, please close.

Best Answer

From the dpkg man page

  -C, --audit
          Searches for packages that have been installed only partially on your system. dpkg will suggest what to do with them to get them working.

So dpkg -C (as user) may work. However, I can't test this since I don't have any broken packages.