[Debconf-devel] Bug#511726: remove database entry upon a package purge

jidanni at jidanni.org jidanni at jidanni.org
Tue Jan 13 20:29:47 UTC 2009


Package: debconf
Version: 1.5.24
Severity: wishlist

In /var/cache/debconf do config.dat and templates.dat just grow and
grow, never removing cruft from purged packages?

$ debconf-show --listowners|xargs dpkg -l
shows lots that are long gone.

I looked through the documentation but couldn't find anything about
removing an entry upon package purge. Ah ha:
$ man debconf-set-selections|grep -B1 away
       or are installed. Otherwise you can end up with values in the database
       for uninstalled packages that will not go away, or with worse problems

In my ideal, installing and then purging a package should just leave
behind a log entry at most.

Anyway, I was hoping to compare config.dat from machine A vs. from
machine B, but I couldn't find any "--forget-old-unavail" cleanup
function, like dpkg has.

You might say "well the user might one day want to install again, and
we want to give him familiar defaults." OK, but still I want to do a
yearly --forget-old-unavail.

OK, to do my comparison between the machines I will try
$ set $(debconf-show --listowners|xargs dpkg -l|
perl -alnwe 'print $F[1] if $F[0] eq "ii"')
$ debconf-show $@ > debconf_settings
which should be cruft free, and compare it to the same file from
machine 2.

And to actually clean up the databases, I would probably use
debconf-copydb configdb newdb --owner-pattern=\
$(echo $@|perl -plwe 's/\w+/^$&\$/g;tr/ /|/') ...





More information about the Debconf-devel mailing list