The former administrator might have faced a situation were he used the 'Keep All' command when after removing a meta-package or updating/removing a core package.
First, let us make sure that the system is in a 'correct' state.
Code: Select all
cat /etc/apt/sources.list
apt-cache policy
dpkg --audit
aptitude --simulate -f install
aptitude --simulate full-upgrade
Assuming everything there seems right, within Aptitude's graphic interface, select 'Limit view' (press
lowercase L) and try these patterns:
- On a 'finished' system (i.e. that is not in the building process), all Libraries of priority Optional should be flagged as 'Automatically installed' even if they are not (it is a limitation of the Debian Installer.) So, use this pattern and flag them all at once (press uppercase M on them.)
Code: Select all
?installed ?priority(optional) ?section(lib)
- List the installed packages that are not already flagged as 'Automatically installed' and are also reverse dependencies ('hard' ones or recommendations) of other installed packages.
One can ignore packages with priorities Required or Important, since they all should be flagged as 'Manually installed' anyway.
Code: Select all
?installed ?not(?automatic) ?not(?priority(required)) ?not(?priority(important)) ?reverse-depends(?installed)
Code: Select all
?installed ?not(?automatic) ?not(?priority(required)) ?not(?priority(important)) ?reverse-recommends(?installed)
You still need to check the listed packages, but this should provide you with some leads.
Once the dependency chains of the system are tidier,
deborphan (orphaner) will ease you list the remaining orphan packages.
This message might help you too
http://forums.debian.net/viewtopic.php?p=499596#p499596