Score:1

Snaps mounting errors on boot even after removing snaps

ne flag

I am using Ubuntu 22.04 lts, i removed snapd from my system and replaced snaps with flatpaks. Now whenever I boot the pc, it shows these errors, but it boots normally and works normally, I just want to get rid of these annoying errors.

(why show me snap mounting errors when I no more use snaps? maybe due to some leftover files or configuration?)

Image Here: https://i.stack.imgur.com/1V71P.jpg

Web Wizzards avatar
ne flag
I installed snapd but running 'snap list' says no snap is installed. But the mounting errors still persist.
Score:0
id flag

All you should have to do is remove the call(s) that tries to mount the snap files at bootup. These files are contained in the /etc/systemd/system/ directory.

Remove the snap .mount file(s) for the one(s) you don't want.

Example:

terrance@terrance-ubuntu:/etc/systemd/system$ ls *.mount
 snap-bare-5.mount
 snap-bitwarden-84.mount
 snap-bitwarden-85.mount
'snap-canonical\x2dlivepatch-146.mount'
'snap-canonical\x2dlivepatch-164.mount'
 snap-code-122.mount
 snap-code-123.mount
 snap-core-14784.mount
 snap-core-14946.mount
 snap-core18-2714.mount
 snap-core18-2721.mount
 snap-core20-1828.mount
 snap-core20-1852.mount
 snap-core22-547.mount
 snap-core22-583.mount
 snap-cups-872.mount
'snap-gnome\x2d3\x2d28\x2d1804-161.mount'
'snap-gnome\x2d3\x2d28\x2d1804-194.mount'
'snap-gnome\x2d3\x2d38\x2d2004-119.mount'
'snap-gnome\x2d3\x2d38\x2d2004-137.mount'
'snap-gtk2\x2dcommon\x2dthemes-13.mount'
'snap-gtk\x2dcommon\x2dthemes-1535.mount'
 snap-snapd-18357.mount
 snap-snapd-18596.mount
'snap-snap\x2dstore-599.mount'
'snap-snap\x2dstore-638.mount'
'snap-ubuntu\x2dapp\x2dplatform-34.mount'
 snap-warble-5.mount

Within each of these files contains the mount instructions and snap file it is going to mount.

terrance@terrance-ubuntu:/etc/systemd/system$ cat snap-bitwarden-85.mount 
[Unit]
Description=Mount unit for bitwarden, revision 85
After=snapd.mounts-pre.target
Before=snapd.mounts.target
Before=local-fs.target

[Mount]
What=/var/lib/snapd/snaps/bitwarden_85.snap
Where=/snap/bitwarden/85
Type=squashfs
Options=nodev,ro,x-gdu.hide,x-gvfs-hide
LazyUnmount=yes

[Install]
WantedBy=snapd.mounts.target
WantedBy=multi-user.target

The easiest way since you are not going to use snaps anymore would be to go to that directory and remove all of the .mount files.

cd /etc/systemd/system
sudo rm -Rf snap*

I chose the sudo rm -Rf snap* command because there is another sub-directory also containing .mount files and since they all start with the word snap, that should cover them all.

After those files are gone you shouldn't see the mount errors anymore.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.