apt confusion

der.hans PLUGd at LuftHans.com
Thu Sep 15 11:15:19 MST 2005


Am 15. Sep, 2005 schwätzte Alex Dean so:

> I want to remove the exim4 MTA so I can install qMail.  There seem to be
> some connections between packages that I don't understand, because every
> time I try to remove exim, it also removes MySQL, PostGres and a few
> others...
>
>     # apt-get remove exim4-daemon-heavy
>     Reading Package Lists... Done
>     Building Dependency Tree... Done
>     The following packages will be REMOVED:
>       at courier-pop exim4-daemon-heavy mailman mailx mutt mysql-server-4.1
>       postgresql postgresql-contrib
>
> This doesn't make any sense to me.  Why can't I just remove exim?

It will likely cause problems because it's supplying mail-transport-agent.

###
Version: 7.4.7-6sarge1
Replaces: postgresql-pl, libpgtcl (<< 7.3rel-5), libpgperl (<< 1:2.0.1-1)
Depends: libc6 (>= 2.3.2.ds1-21), libcomerr2 (>= 1.33-3), libkrb53 (>=
1.3.2), l
ibpam0g (>= 0.76), libperl5.8 (>= 5.8.4), libreadline4 (>= 4.3-1),
libssl0.9.7,
python2.3 (>= 2.3), zlib1g (>= 1:1.2.1), debconf (>= 0.5) | debconf-2.0,
dpkg (>
= 1.10.3), procps, debianutils (>= 1.13.1), postgresql-client (>= 7.4),
libpq3 (
>= 7.4), mailx, ucf (>= 0.28)
Pre-Depends: adduser (>= 3.34)
###

postgresql depends on mailx and mailx depends on either exim or
mailt-transport-agent.

When you remove exim all packages depending on it and mail-transport-agent
are queued to be removed at the same time because you will no longer have
all of their dependencies.

> I thought 'OK, maybe I just have to remove it all for some reason, and
> then I can later re-install MySQL'.  But, when I do that, it also
> reinstalls exim!

There's a way to handle it without removing the extra packages. Install
the new mail-transport-agent at the same time.

apt-get install exim4- postfix

By putting a dash behind the package name tells apt-get to remove the
package. The same mechanism works for the command line usage of aptitude.

If you're using an interactive mechanism such as synaptic or interactive
aptitude try to mark the new package for installation rather than marking
the old package for removal. That will bring up a dialog showing what
packages need to be removed in order to install the new package, but they
should only be the packages that truly conflict.

BTW, after making the switch search for extra exim packages that are still
there ( dpkg --get-selections | grep exim ) and use deborphan to see if
you have any spurious packages sitting around.

ciao,

der.hans
-- 
#  https://www.LuftHans.com/
#  I've got a photographic memory,
#  but I'm lousy photographer. - der.hans


More information about the PLUG-discuss mailing list