: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}"
if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then
	sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" \
		-e ':a /^#DB#:\s/ s/\s(#SERVICE_NAMES#)\s+\[!?[A-Z]+=[a-z]+\](\s|$)/\2/g ; t a' \
		-e ':a /^#DB#:\s/ s/\s(#SERVICE_NAMES#)(\s|$)/\2/g ; t a'
fi
