#!/bin/sh

set -e

hook=/etc/apt/apt.conf.d/20listchanges

if [ "$1" = "remove" ]; then
    test -e $hook && mv $hook $hook.disabled
fi

if [ "$1" = "purge" ]; then
    rm -f $hook.disabled
    rm -f /var/lib/apt/listchanges.db
    if which ucf > /dev/null 2>&1; then
        ucf -p /etc/apt/listchanges.conf
    fi
    rm -f /etc/apt/listchanges.conf
fi

#DEBHELPER#

exit 0
