Running that with some options for verbosity confirmed that it isn't the deluser/delgroup calls that break.
Instead later on in the postrm (/var/lib/dpkg/info/libvirt-daemon-system.postrm) the generated snippets enter
# Automatically added by dh_installdebconf/11.1.6ubuntu2
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
+ IFS=
read -r _db_internal_line
+ RET=20 Unsupported command "removing" (full line was "Removing group `libvirtd' ...") received from confmodule.
+ return 20
So the issue seems about removing group libvirtd (and not libvirt-dnsmaq as it first seemed) and somehow that error message creeps into the debconf handling and then breaks it there.
Running that with some options for verbosity confirmed that it isn't the deluser/delgroup calls that break. dpkg/info/ libvirt- daemon- system. postrm) the generated snippets enter
Instead later on in the postrm (/var/lib/
# Automatically added by dh_installdebco nf/11.1. 6ubuntu2 debconf/ confmodule ]; then debconf/ confmodule
if [ "$1" = purge ] && [ -e /usr/share/
. /usr/share/
db_purge
fi
# End automatically added section
That section triggers this log:
+ [ -e /usr/share/ debconf/ confmodule ] debconf/ confmodule
+ . /usr/share/
+ [ ! 1 ]
+ [ -z ]
+ exec
+ [ ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ db_purge
+ _db_cmd PURGE
+ _db_internal_IFS=
+ IFS=
+ printf %s\n PURGE
+ IFS=
+ IFS=
read -r _db_internal_line
+ RET=20 Unsupported command "removing" (full line was "Removing group `libvirtd' ...") received from confmodule.
+ return 20
So the issue seems about removing group libvirtd (and not libvirt-dnsmaq as it first seemed) and somehow that error message creeps into the debconf handling and then breaks it there.