Ubuntu – Reason for snap apps (re)installation on 19.10 upgrade

19.10snapupgrade

In 19.04 I had removed all of the snap applications, and installed regular code versions of these same applications.

I upgraded to 19.10 and it reinstalled all of the same snap applications! This can be seen as the various /dev/loop[1-8] devices…

 Filesystem      Size  Used Avail Use% Mounted on
 /dev/sda7       568G  381G  159G  71% /
 /dev/loop1      3.8M  3.8M     0 100% /snap/gnome-system-monitor/107
 /dev/loop2       15M   15M     0 100% /snap/gnome-characters/359
 /dev/loop3      157M  157M     0 100% /snap/gnome-3-28-1804/91
 /dev/loop0       23M   23M     0 100% /snap/snapd/4992
 /dev/loop4       45M   45M     0 100% /snap/gtk-common-themes/1353
 /dev/loop5      1.0M  1.0M     0 100% /snap/gnome-logs/81
 /dev/loop6      4.3M  4.3M     0 100% /snap/gnome-calculator/544
 /dev/loop7       55M   55M     0 100% /snap/core18/1223
 /dev/sda6        11G  6.7G  4.0G  63% /media/username/Shared_Data
 /dev/sda2        96M   74M   23M  77% /boot/efi
 /dev/sdb1       384G   73G  292G  20% /media/username/Timeshift
 /dev/sdb2        57G   98M   57G   1% /media/username/Shared_Data_2
 /dev/loop8       55M   55M     0 100% /snap/core18/1265

Any idea why Ubuntu insists on (re)installing snap applications? Don't they delay boot times? What makes these snap applications better?

Best Answer

Look at the manifest. It specifies all the snaps and snap-associated packages that would be installed.

gir1.2-snapd-1:amd64    1.49-0ubuntu1
gnome-software-plugin-snap      3.30.6-2ubuntu10
libsnapd-glib1:amd64    1.49-0ubuntu1
snapd   2.41+19.10.1
snap:core       stable  7917
snap:core18     stable  1223
snap:gnome-3-28-1804    stable/ubuntu-19.10     71
snap:gnome-calculator   stable/ubuntu-19.10     501
snap:gnome-characters   stable/ubuntu-19.10     317
snap:gnome-logs stable/ubuntu-19.10     81
snap:gtk-common-themes  stable/ubuntu-19.10     1353

The fact that you deleted them in 19.04 shouldn't have affected what's installed in 19.10 but that doesn't seem to be the case.

In 19.04, if you run sudo apt purge snapd, doing so would remove, in addition to snapd, the snaps presently installed on your system. Now, if you run sudo do-release-upgrade, neither snapd nor any snaps are installed. Two users, here, and here, have verified this. I also checked, in a VM, that the upgrade from 19.04 to 19.10 didn't reinstall snaps or snapd, if sudo apt purge snapd was run before sudo apt purge snapd.

Whether this situation will persist if users eventually upgrade from 19.10 to 20.04 is unclear.

However, there's a comment over at discourse.ubuntu.com worth reading. Quoting from there:

This just sounds like a feature request in the upgrade tool. Essentially if the user has already removed a snap, and installed the deb of the application, then an upgrade happens they get a thing back that they removed.

However, I’m not sure the upgrade tools have the intelligence to know that you previously removed the snap, and don’t want it back. Further, the point of the upgrade tool is to take you to the new release. Those snaps are part of the new release. I have a feeling if you removed firefox from 19.04 and upgraded to 19.10, you’d get firefox back. Which is a similar use case that you’re describing.

That comment indicates that snaps should be reinstalled which isn't what we, who purged snapd see.

(I would also point out that before upgrading to 19.10, I purged several fonts I don't need. They too were not re-installed.)


Re.

What makes these snap applications better?

Martin Wimpress is the new Desktop Director of Ubuntu. He talks about the rationale behind snaps in this video: Future of Ubuntu & Unpacking Snaps with Martin Wimpress | Part 2 | IG Talks ep. 4.

Related Question