#!/bin/sh -e

[ "$1" = "purge" ] || exit 0

if [ -e /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule;
	db_purge;
fi

update-rc.d bitlbee remove > /dev/null 2>&1 || true
rm -f /etc/default/bitlbee

deluser --system --remove-home bitlbee || true
rm -rf /var/lib/bitlbee ## deluser doesn't seem to do this for homedirs in /var
