Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to uninstall sendmail-base package but failed. Is there any way to remove this?

root@server:~# apt-get remove --purge sendmail-base 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  sendmail-base*
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 1,274kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 67543 files and directories currently installed.)
Removing sendmail-base ...
Can't locate DebianNet.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/sbin/update-inetd line 23.
dpkg: error processing sendmail-base (--purge):
 subprocess installed pre-removal script returned error exit status 2
Errors were encountered while processing:
 sendmail-base
E: Sub-process /usr/bin/dpkg returned an error code (1)



root@server# uname -a
Linux server 2.6.32-27-generic-pae #49-Ubuntu SMP Thu Dec 2 00:07:52 UTC 2010 i686 GNU/Linux



root@server# dpkg -l sendmail-base
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                      Version                                   Description
+++-=========================================-=========================================-==================================================================================================
pF  sendmail-base                             8.14.3-9.1ubuntu1                         powerful, efficient, and scalable Mail Transport Agent
share|improve this question

3 Answers 3

up vote 2 down vote accepted

Can you find DebianNet.pm on your system?

Use apt-file search to find the package that provides that file, install that package and retry removing.

share|improve this answer
    
Yes i can. apt-file search DebianNet.pm update-inetd: /usr/share/perl5/DebianNet.pm –  Diden May 23 '13 at 14:01
    
You probably want to install that package then, and retry the removal. –  Cian May 23 '13 at 14:02
    
Thanks ! I found I did the following : apt-get install update-inetd && apt-get remove sendmail-base. Works great now! –  Diden May 23 '13 at 14:06

I'm not sure why that isn't working.Try using this command line:

sudo apt-get autoremove sendmail-base

This will autoremove the dependencies, then you can try to remove it again.

share|improve this answer

This package seems to require Netbase (which includes DebianNet.pm) to run its uninstall script. You can install this, and the pre-removal script should run correctly.

share|improve this answer
    
Package is on the system. –  Diden May 23 '13 at 14:03
    
Package is on the system. dpkg -l netbase Desired=Unknown/Install/Remove/Purge/Hold –  Diden May 23 '13 at 14:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.