I've been using Ubuntu for 12 years, and snap
in the recent releases of Ubuntu is really a disgrace. It creates lots of problems. After an upgrade, Chromium does not start due to the following error:
chromium_chromium.desktop[122932]: snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks: Operation not permitted
If a package changes configuration in a new version, it's its responsibility to make it work. Now, I have to reconfigure it after each start by
sudo apparmor_parser -r /etc/apparmor.d/*snap-confine*
How can I fully uninstall snap and re-install its packages by regular apt
?
I don't have many packages handled by snap
.
snap list
Name Version Rev Tracking Publisher Notes
chromium 85.0.4183.121 1328 latest/stable canonical✓ -
core18 20200724 1885 latest/stable canonical✓ base
gnome-3-34-1804 0+git.3556cb3 60 latest/stable canonical✓ -
gtk-common-themes 0.1-36-gc75f853 1506 latest/stable canonical✓ -
snap-store 3.36.0-80-g208fd61 467 latest/stable/… canonical✓ -
snapd 2.46.1 9279 latest/stable canonical✓ snapd
My question is how to safely remove snap
. From the snap list
, I see gnome
depends on snap
.
In Ubuntu 20.04 LTS (but it works also in the following releases till 22.04, that is the current one), I removed
snapd
following these steps:Then, to avoid that other applications may reinstall it (
chromium-browser
is an example of application that restoressnapd
even if installed viaapt
) you can create a fileno-snap.pref
by issuing:and then copying the following content in it:
Full credit to Don Prince for a comprehensive and effective solution from this link
I recommend you run the commands individually. Some you won't need, and for some you may need one or two extra lines.
Run the exploratory informational commands listed in the comments to determine the specific situation in your install.
Also installs Deb packaged last known Chromium and pins it to prevent snapd taking over again in future. Awesome! Thanks Don!
I agree with you about snaps.
I have completely removed snaps from my system by doing this:
Now the system works well Although I had to substitute snap programs with their APT or .deb file versions when available. Unfortunately in my case I've lost an application that I need but that's the price I had to pay, but I gained some disk space and my boot time is a little shorter.
gnome is still installed and works regularly as before