Encountered on a test env:

root@fubar:~# apt-get purge lightdm mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mysql-server is not installed, so not removed
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-25 mysql-server-core-5.5 mysql-client-core-5.5 
unity-greeter linux-headers-3.2.0-25-generic liblightdm-gobject-1-0
  mysql-server-5.5 mysql-client-5.5
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
  lightdm*
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 ... 200648 files and directories currently installed.)
Removing lightdm ...
Purging configuration files for lightdm ...
Removing user `lightdm' ...
Warning: group `lightdm' has no more members.
userdel: user lightdm is currently logged in
/usr/sbin/deluser: `/usr/sbin/userdel lightdm' returned error code 8. Exiting.
dpkg: error processing lightdm (--purge):
 subprocess installed post-removal script returned error exit status 1

Errors were encountered while processing:
 lightdm
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@fubar:~# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"

By this time the service scripts were partially removed there was no way
to terminate the lightdm, killed it:

root@fubar:~# ps -ef|grep -v grep | grep lightdm | awk '{print $2}'  |
xargs kill -9

and then repeated the step:
root@fubar:~# apt-get purge lightdm mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mysql-server is not installed, so not removed
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-25 mysql-server-core-5.5 mysql-client-core-5.5 
unity-greeter linux-headers-3.2.0-25-generic liblightdm-gobject-1-0
  mysql-server-5.5 mysql-client-5.5
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
  lightdm*
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 ... 200648 files and directories currently installed.)
Removing lightdm ...
Purging configuration files for lightdm ...
Removing user `lightdm' ...
Warning: group `lightdm' has no more members.
Done.
dpkg: warning: while removing lightdm, directory '/etc/lightdm' not empty so 
not removed.
Processing triggers for ureadahead ...

And finally it's gone.

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

Title:
  package lightdm (not installed) failed to install/upgrade: subprocess
  installed post-removal script returned error exit status 1

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to