Purging Debian dpkg-deb config information complately

171 Views Asked by At

I am creating a debian package (.deb)
I wanted to get answer to some questions.
Somehow, installation of newly created .deb file was not asking question after asking once, even if package is purged
Setting question priority critical does not help
How can remove old answers totally? This is important during package creation page

2

There are 2 best solutions below

0
On BEST ANSWER

Another way to remove all of your package's questions from debconf's database is to call db_purge in your postrm script, when removing or purging the package.

You have to previously load the debconf library:

. /usr/share/debconf/confmodule

For example:

#! /bin/sh

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

case "$1" in
    remove|purge)

        # Remove all package's questions from debconf's database.
        db_purge
    ;;

    *)
        exit 0
    ;;
esac

exit 0
0
On

After a bit of search I found that, debconf stores answers in /var/cache/debconf/config.dat.
Open it, search for the concerned package and remove all details from this file.