|A screenshot of the apt-get program of APT installing MediaWiki on Ubuntu 10.10. (Photo credit: Wikipedia)|
The first thing to do is to run a dist-upgrade command. It most cases it will solve your issues.
sudo apt-get update sudo apt-get dist-upgradeIf dist-upgrade did not solve your problems, it means that you have managed to put a real mess in your system. We are going to list the broken packages to understand better the problems.
sudo aptitude install deborphan apt-file sudo apt-file update deborphan |moreIf you see broken packages, it may be time to remove them... If you want to do so, run the following command as many time as required until you have no broken package anymore.
deborphan | xargs sudo dpkg --purgeFinally, let's update and install the required packages to get back to a normal system.
In aptitude, press "u" to update the repository package lists. If any error occurs, tidy your /etc/apt/source.list and /etc/apt/sources.list.d. When this is done, press "g" to update your system. And that's it, package inconsistencies should be solved.