Handling of snap configuration is currently not working as it should during removals and reverts.
The goal is for snaps to completely reset their configuration if they are removed and then reinstalled, and on reverts the configuration that was in place when the snap was refreshed should be brought back exactly as it was at that time. Instead, at the moment the configuration is preserved as it currently is during all operations.
i would actually call this a feature… probably not a desired one but since we have it, could we make it configurable for the snap maintainer if the config is kept or not ?
if i install a deb package … i.e. a webserver or proxy, any manually changed configuration is kept in place and in case i re-install the binary it just works as before with the same configuration. while this might not be desired all the time i think it is a valid case to think about defaulting to remove the config but offering a snapcraft.yaml option to force-keep it.
It’d be inconsistent with the current behavior otherwise. We remove the snap data as well, for example. That’s been proven in practice with people reporting the surprise.
That said, we never got into snapshots. Once we have those, we can consistently bundle both the data and the configuration of the snap in a first class way, perhaps on removals as well.