Package remove with dbconfig-common does not purge db

integration

#1

hello,

I’m trying to create a package for the AppCenter, but I’m a little bit stuck with completely removing the package using AppCenter. I am using dbconfig-common to configure a postgresql database and when i remove my package manually with --purge, the database is removed, but when removing the package via SoftwareManagement, apt-get remove is called without purge and hence the database is not purged and will remain on the system. Thsi leads to problems when reinstalling the package. I already tried to call dbc_go package_name purge manually, but this doesn’t seem to work. Any ideas how I could proceed?

Thanks in advance

Best regards
vgs


#2

Hi,

yes, that is true, the AppCenter only removes the packages, so maybe you can manually add a db_purge in your package postrm script for the “remove” case?

[code]…

. /usr/share/debconf/confmodule
db_version 2.0

. /usr/share/dbconfig-common/dpkg/postrm…
dbc_go …

case “$1” in
purge)

;;
remove)
# purge database also on remove
db_purge

[/code]