[Bug 997282] Re: sudo doesn't uninstall completely

Dominique Potvin 997282 at bugs.launchpad.net
Mon May 28 14:40:52 UTC 2012


You're right, it does uninstall properly, unless you install sudo-ldap
first.

Here's the step to reproduce:
1- install sudo-ldap
root at srv# apt-get install sudo-ldap
 ...
 The following packages will be REMOVED:
  sudo
The following NEW packages will be installed:
  sudo-ldap
...

2- Validate sudo-ldap is install and sudo is not completely removed
root at srv# dpkg -l|grep sudo  
rc  sudo                        1.8.3p1-1ubuntu3.2         Provide limited super user privileges to specific users
ii  sudo-ldap                   1.8.3p1-1ubuntu3.2         Provide limited super user privileges to specific users

3- Try to remove sudo completely
root at srv# apt-get remove --purge sudo
Then you get the error

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/997282

Title:
  sudo doesn't uninstall completely

Status in “sudo” package in Ubuntu:
  Incomplete

Bug description:
  On precise (12.04) the removal of sudo fail.

  ******command output************
  root at ubuntu:/var/lib/dpkg/info# apt-get remove --purge sudo
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages will be REMOVED:
     sudo* (1.8.3p1-1ubuntu3)
  0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
  After this operation, 0 B of additional disk space will be used.
  Do you want to continue [Y/n]? y
  (Reading database ... 52741 files and directories currently installed.)
  Removing sudo ...
  Purging configuration files for sudo ...
  update-rc.d: /etc/init.d/sudo exists during rc.d purge (use -f to force)
  dpkg: error processing sudo (--purge):
   subprocess installed post-removal script returned error exit status 1
  Errors were encountered while processing:
   sudo
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  root at ubuntu:/var/lib/dpkg/info# dpkg -l|grep -v ^ii
  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ Name                             Version                        Description
  +++-================================-==============================-==========================================================================
  pc  sudo                             1.8.3p1-1ubuntu3               Provide limited super user privileges to specific users
  ************end of output**************

  As stated in the error message adding -f to update-rc.d in /var/lib/dpkg/info/sudo.postrm does fix the problem.
  Here's the diff:
  22c22
  < 	update-rc.d sudo remove >/dev/null
  ---
  > 	update-rc.d -f sudo remove >/dev/null

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/997282/+subscriptions




More information about the foundations-bugs mailing list