Removing a snap also removes its matching user's configuration?

Hi,

I’ve noticed something I did not expect when removing some snap, gimp and audacity these times.
It seems removing a snap also deletes its user’s configuration.

When re-installing, they’re like brand new meaning that I don’t find back gimp or audacity with the preferences I had previously set.

I really did not expect that, as I’m used to APT/.deb packaging where user’s configuration stay in ~/ even after uninstalling an app.

Is this intended behavior for snap ?
Should I have done something to « save » those preferences ?

If it’s intended may snap have the politeness to offer users the ability to save ( or not ) their preferences before actually removing. Or at least an informative warning.

Or is something broken or unset on my system ?

I’m nowadays using Ubuntu Budgie 20.04 but encountered this issue first on 19.10.

django@ASGARD:~$ dpkg -l | grep snap
(…)
ii  gir1.2-snapd-1:amd64                  1.57-0ubuntu3                       amd64        Typelib file for libsnapd-glib1
ii  gnome-software-plugin-snap            3.36.0-0ubuntu3                     amd64        Snap support for GNOME Software
ii  libsnapd-glib1:amd64                  1.57-0ubuntu3                       amd64        GLib snapd library
ii  libsnappy1v5:amd64                    1.1.8-1build1                       amd64        fast compression/decompression library
ii  snapd                                 2.44.3+20.04                        amd64        Daemon and tooling that enable snap packages
django@ASGARD:~$ 

and few snaps installed

django@ASGARD:~$ snap list
Nom                    Version                     Révision  Suivi            Éditeur       Notes
adapta-gtk-snap        0.2                         10        latest/stable    kd913         -
chromium               83.0.4103.61                1165      latest/stable    canonical✓    -
core                   16-2.44.3                   9066      latest/stable    canonical✓    core
core18                 20200427                    1754      latest/stable    canonical✓    base
gimp                   2.10.18                     273       latest/stable    snapcrafters  -
gnome-3-28-1804        3.28.0-16-g27c9498.27c9498  116       latest/stable    canonical✓    -
gtk-common-themes      0.1-36-gc75f853             1506      latest/stable    canonical✓    -
gtk2-common-themes     0.1                         9         latest/stable    canonical✓    -
ubuntu-budgie-welcome  0.12.6                      206       latest/stable/…  ubuntubudgie  classic
django@ASGARD:~$

Here is what remains after removing audacity-snap :
after_removin_audacity_snap

When removed snaps save their config files in snapshots. Use snap saved to list them and snap restore <id> to restore their config files. snap forget <id> removes them.

I tried installing and reinstalling osb-studio and it did not auto-restore snapshot but using snap restore <id> command worked. Auto-restoring snapshots after reinstall is not expected behavior for snaps. Maybe it should be…

Indeed

django@ASGARD:~$ snap saved
Ensemble  Snap      Âge      Version  Version  Taille  Notes
1         gimp      28.7j    2.10.18  252      7.53MB  auto
2         gimp      28.7j    2.10.18  252       101kB  auto
3         audacity  18h0min  2.4.1    660       818kB  auto
django@ASGARD:~$ 

Now as a stupid user… how was I supposed to be in the know of such a feature ? ⋅ do app-store ( software, gnome-software ) inform user his⋅her data have been saved and how to restore them ??? [ a restore tab beside explore and installed maybe ? ] ⋅ do cli snap remove inform user about it ???

Now I know. So thanks for that @predr :wink:

Does a full-featured friendly UI for managing snap exist ?

Snap managers only install and remove snaps, I haven’t seen any that does anything extra. Find the one you like and ask them to add this feature.

Ok for snap managers, it’s up to them to implement existing snap-feature into their UI, user side. Ok.

But snap cli should also clearly inform user on what’s about to happen if he removes a snap.
And points him towards the snap saved feature.

I opened a PR to improve the help for snap remove to make more clear the automatic snapshotting feature and also mention the usage of snap restore. See https://github.com/snapcore/snapd/pull/8782

2 Likes