LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   apt-get won't remove package (https://www.linuxquestions.org/questions/debian-26/apt-get-won%27t-remove-package-4175485364/)

littlebigman 11-21-2013 05:37 AM

apt-get won't remove package
 
Hello

The ARM appliance I'm using is running Debian7 and has Exim4 pre-installed.

Since I don't need an MTA, I wanted to remove it, but it doesn't work:
Code:

# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address          Foreign Address        State      PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*              LISTEN      1926/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*              LISTEN      1869/exim4
tcp6      0      0 :::22                  :::*                    LISTEN      1926/sshd
tcp6      0      0 ::1:25                  :::*                    LISTEN      1869/exim4
udp        0      0 0.0.0.0:40866          0.0.0.0:*                          1911/dhclient
udp        0      0 0.0.0.0:68              0.0.0.0:*                          1911/dhclient
udp6      0      0 :::30977                :::*                                1911/dhclient

# dpkg -l | grep exim
rc  exim4                                4.80-7                        all          metapackage to ease Exim MTA (v4) installation
ii  exim4-base                            4.80-7                        armel        support files for all Exim MTA (v4) packages
ii  exim4-config                          4.80-7                        all          configuration for the Exim MTA (v4)
ii  exim4-daemon-light                    4.80-7                        armel        lightweight Exim MTA (v4) daemon

# apt-get remove exim4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'exim4' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  dmsetup libdevmapper1.02.1 libevent-2.0-5 libgssglue1 libnfsidmap2 libtirpc1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Why does apt-get fail removing the Exim4 package?

Thank you.

andrewthomas 11-21-2013 05:51 AM

What is the output of:

Code:

apt-cache showpkg exim4

littlebigman 11-21-2013 05:56 AM

Here it is:
Code:

# apt-cache showpkg exim4
Package: exim4
Versions:
4.80-7 (/var/lib/apt/lists/ftp.fr.debian.org_debian_dists_wheezy_main_binary-armel_Packages) (/var/lib/dpkg/status)
 Description Language:
                File: /var/lib/apt/lists/ftp.fr.debian.org_debian_dists_wheezy_main_binary-armel_Packages
                  MD5: 458592f74d76e446735736c1d55ce615
 Description Language: en
                File: /var/lib/apt/lists/ftp.fr.debian.org_debian_dists_wheezy_main_i18n_Translation-en
                  MD5: 458592f74d76e446735736c1d55ce615


Reverse Depends:
  typo3-src-4.5,exim4
  typo3-dummy,exim4
  subversion-tools,exim4
  whatsnewfm,exim4
  vzdump,exim4
  vm,exim4
  xdeview,exim4
  uudeview,exim4
  uucp,exim4
  uqwk-spool,exim4
  uqwk,exim4
  typo3-src-4.5,exim4
  typo3-dummy,exim4
  task-mail-server,exim4
  systraq,exim4
  sxid,exim4
  subversion-tools,exim4
  solid-pop3d,exim4
  sn,exim4
  smokeping,exim4
  schleuder,exim4
  libsbuild-perl,exim4
  buildd,exim4
  sauce,exim4
  rt4-clients,exim4
  request-tracker4,exim4
  reportbug,exim4
  renattach,exim4
  prayer-accountd,exim4
  prayer,exim4
  postgrey,exim4
  popularity-contest,exim4
  popa3d,exim4
  phpbb3,exim4
  movabletype-opensource,exim4
  monit,exim4
  mlmmj,exim4
  mailto,exim4
  mailman,exim4
  mailgraph,exim4
  maildrop,exim4
  mailagent,exim4
  lire,exim4
  libnews-article-perl,exim4
  killer,exim4
  ipband,exim4
  heirloom-mailx,exim4
  gup,exim4
  greylistd,exim4
  gotmail,exim4
  gosa,exim4
  gnats-user,exim4
  gnats,exim4
  email-reminder,exim4
  debsecan,exim4
  debarchiver,exim4
  cron,exim4
  citadel-server,exim4
  biabam,exim4
  backuppc,exim4
  autolog,exim4
  alpine,exim4
Dependencies:
4.80-7 - debconf (18 0.5) debconf-2.0 (0 (null)) debconf (18 1.4.69) cdebconf (2 0.39) exim4-base (2 4.80) exim4-daemon-light (16 (null)) exim4-daemon-heavy (16 (null)) exim4-daemon-custom (0 (null))
Provides:
4.80-7 -
Reverse Provides:
#

Is it because other apps need an MTA? In that case, I would expect apt-get to be more explicit.

Hungry ghost 11-21-2013 07:09 AM

Actually the package is not installed. The 'rc' status means the package has been removed but some configuration files are still in the system. You probably want to purge the package:

Code:

apt-get purge exim4
You also probably want to remove (and purge) the remaining exim4-related packages you have in your system.

littlebigman 11-21-2013 07:19 AM

Thanks for the tip.

Here's what I did:
Code:

apt-get purge exim4

dpkg -l | grep exim4

apt-get remove exim4-base exim4-config exim4-daemon-light
(this also remove bsd-mailx)

apt-get purge exim4-base exim4-config exim4-daemon-light

apt-get autoremove

netstat -tunlp : exim4 is no longer listed.

I find it strange, though, that apt-get would go ahead and remove Exim4, and still leave it running, as shown by netstat.

TobiSGD 11-21-2013 07:23 AM

As shown in the output of dpkg -l, exim is merely a metapackage, it doesn't contain any software, so removing it will also not remove any software. Usually the proper way to remove software is to remove the meta-packages and then run autoremove. This works, unless, for whatever reason, one of the packages that were pulled in by the meta-package is marked as installed manually.

Hungry ghost 11-21-2013 07:25 AM

Quote:

Originally Posted by littlebigman (Post 5068318)
I find it strange, though, that apt-get would go ahead and remove Exim4, and still leave it running, as shown by netstat.

Probably the config files that were still in your system were scripts and such that kept exim4 running. BTW, I forgot to tell you, when you need to purge a package, you don't have to remove it first, simply purge it and apt-get will remove and purge it right away.

edit: TobiSGD explained it better than me :)

littlebigman 11-21-2013 09:14 AM

Good to know. Thanks.

goumba 11-26-2013 11:51 AM

Quote:

Originally Posted by odiseo77 (Post 5068322)
Probably the config files that were still in your system were scripts and such that kept exim4 running. BTW, I forgot to tell you, when you need to purge a package, you don't have to remove it first, simply purge it and apt-get will remove and purge it right away.

Just a little correction. The binaries are gone, so there is no application to keep running. The only thing left is the config files because it was never requested that they be removed, and apt is nice enough to remind you of that.


All times are GMT -5. The time now is 10:37 PM.