[ubuntu-uk] Aptitude dependency hell - SOLVED

Tony Arnold tony.arnold at manchester.ac.uk
Sun Feb 11 22:05:28 GMT 2007

On Tue, 06 Feb 2007 22:28:55 +0000, Tony Arnold wrote:

> I've just run aptitude in full screen mode for the first time on my
> Dapper system and in the third line down it tells me:
> #Broken: 235 Will free 915MB of disk space  DL: 5576kB
> and at the bottom of the screen with a red background is says:
> Suggest 5 installs, 32 removals, 133 keeps.
> I've run apt-get check which reports no errors and I've tried apt-get -f
> install, which again does nothing. My repository information is all up
> to date.
> So are these real problems? The few I've looked at suggest not, but it's
> not that clear to me. And if so, how can I fix it?
> Note this system started out as Warty and has been upgraded to Dapper
> usually by editing sources.list file and running apt-get update&&apt-get
> dist-upgrade.

I spoke to a local Debian guru who helped me out on this.

It seems the problem is caused by old versions of packages not being
completely removed (i.e., purged) when a new version is installed. This
leaves the package removed but its config files still present, at so far
as aptitude/dpkg is concerned.

The fix is to do two things.

Firstly, run dpkg --get-selections and grep the output for 'deinstall'.
This will give a list of packages that are as above. Use aptitude to
purge these packages. The following code should do the trick:

aptitude purge `dpkg --get-selections|grep deinstall|cut -f 1`

Secondly, running deborphan to find packages that no longer depend on any
other package can be used to do the any final clean up.

After doing this, my problems with aptitude were gone!


More information about the ubuntu-uk mailing list