3

I'd like to remove Snap from my system entirely, but have a smallish problem:

1st, I removed all snap packages:

sudo snap remove $(snap list | tail -n +2 | cut -d" " -f1 | grep -v core | tr "/n" " ")

Then I removed snapd, and the gnome snap plugin

sudo apt remove -y snapd gnome-software-plugin-snap

The problem is that at reboot, Apparmor is looking for a profile for snap, and fails parsing snap configuration files:

Feb 21 21:40:47 dad apparmor[698]: AppArmor parser error for /var/lib/snapd/apparmor/profiles/snap-confine.core.5662 in /var/lib/snapd/apparmor/profiles/snap-confine.core.5662 at line 11: Could not open '/var/lib/snapd/apparmor/snap-confine'

which leaves me with a running system, and no apparmor!

1

The AppArmor profile is located in /etc/apparmor.d/usr.lib.snapd.snap-confine.real file, which came from snapd package.

So you should use apt purge instead apt remove (see man apt for details):

sudo apt purge snapd

Small note: for me the snippet below looks better -

snap remove $(snap list | awk '{print $1}' | egrep -v "Name|core")
  • Maybe it's the purge? I'll try that - one moment... – Charles Green Feb 22 '19 at 20:41
  • I ran with purge, and there's a line that prints specifically stating that it has removed the apparmor profiles! – Charles Green Feb 22 '19 at 20:43
  • That worked well. I'm going to look at the difference between 'remove' and 'purge', but then I think I should find sudo apt remove snap and modify those answers – Charles Green Feb 22 '19 at 20:48
  • 1
    Great! The differences are indicated in man apt. It seems that Dobey did this right :) – N0rbert Feb 22 '19 at 20:51
  • I thought about using ASK for the little code, but I saw the otherone a few days back, and it made me learn a bit more about the shell. – Charles Green Feb 22 '19 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.