#584413 cannot remove xdm: /usr/share/debconf/confmodule: Bad file descriptor

#584413#5
Date:
2010-06-03 11:55:58 UTC
From:
To:
Could not remove xdm 1:1.1.10-1

# dpkg -r xdm
(Reading database ... 110375 files and directories currently installed.)
Removing xdm ...
/usr/share/debconf/confmodule: line 42: 3: Bad file descriptor
  C-c C-c
Received signal.  Aborting xdm package prerm script.

dpkg: error processing xdm (--remove):
 subprocess installed pre-removal script returned error exit status 1
/usr/share/debconf/confmodule: line 90: 3: Bad file descriptor
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 xdm

Feel free to merge this with
#439763, #478661

OK, here's how I worked around it:
I switched to tty1 totally outside of xwindows (nodm), whereupon removal
proceeded smoothly.