LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-21-2013, 05:37 AM   #1
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 660

Rep: Reputation: 35
Question 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.
 
Old 11-21-2013, 05:51 AM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
What is the output of:

Code:
apt-cache showpkg exim4
 
Old 11-21-2013, 05:56 AM   #3
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 660

Original Poster
Rep: Reputation: 35
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.
 
Old 11-21-2013, 07:09 AM   #4
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
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.
 
Old 11-21-2013, 07:19 AM   #5
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 660

Original Poster
Rep: Reputation: 35
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.
 
Old 11-21-2013, 07:23 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.
 
1 members found this post helpful.
Old 11-21-2013, 07:25 AM   #7
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Quote:
Originally Posted by littlebigman View Post
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

Last edited by Hungry ghost; 11-21-2013 at 07:27 AM.
 
Old 11-21-2013, 09:14 AM   #8
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 660

Original Poster
Rep: Reputation: 35
Good to know. Thanks.
 
Old 11-26-2013, 11:51 AM   #9
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by odiseo77 View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] won't let me install a package or remove a package archie101 Linux - Newbie 5 05-09-2011 04:52 PM
Cannot remove a package in Sarge using apt? RyanGRA Debian 5 09-22-2006 08:17 PM
apt-get remove package-name & config files robbbert Linux - Software 2 04-20-2006 05:33 PM
Apt-get: How to remove software without knowing package name? sureshot324 Linux - Software 4 10-27-2005 01:14 PM
HELP with apt-getHow come when I tried to use apt-get to remove a package to regain redss Linux - Newbie 1 08-22-2004 11:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration