How can I safely remove snap without breaking apparmor












2















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 snome-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!










share|improve this question





























    2















    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 snome-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!










    share|improve this question



























      2












      2








      2








      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 snome-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!










      share|improve this question
















      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 snome-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!







      snap 18.10 apparmor






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 6 hours ago







      Charles Green

















      asked 7 hours ago









      Charles GreenCharles Green

      13.7k73758




      13.7k73758






















          1 Answer
          1






          active

          oldest

          votes


















          0














          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")





          share|improve this answer


























          • Maybe it's the purge? I'll try that - one moment...

            – Charles Green
            5 hours ago











          • I ran with purge, and there's a line that prints specifically stating that it has removed the apparmor profiles!

            – Charles Green
            5 hours ago











          • 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
            5 hours ago






          • 1





            Great! The differences are indicated in man apt. It seems that Dobey did this right :)

            – N0rbert
            5 hours ago











          • 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
            5 hours ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120452%2fhow-can-i-safely-remove-snap-without-breaking-apparmor%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          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")





          share|improve this answer


























          • Maybe it's the purge? I'll try that - one moment...

            – Charles Green
            5 hours ago











          • I ran with purge, and there's a line that prints specifically stating that it has removed the apparmor profiles!

            – Charles Green
            5 hours ago











          • 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
            5 hours ago






          • 1





            Great! The differences are indicated in man apt. It seems that Dobey did this right :)

            – N0rbert
            5 hours ago











          • 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
            5 hours ago
















          0














          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")





          share|improve this answer


























          • Maybe it's the purge? I'll try that - one moment...

            – Charles Green
            5 hours ago











          • I ran with purge, and there's a line that prints specifically stating that it has removed the apparmor profiles!

            – Charles Green
            5 hours ago











          • 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
            5 hours ago






          • 1





            Great! The differences are indicated in man apt. It seems that Dobey did this right :)

            – N0rbert
            5 hours ago











          • 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
            5 hours ago














          0












          0








          0







          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")





          share|improve this answer















          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")






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 5 hours ago

























          answered 5 hours ago









          N0rbertN0rbert

          23.3k649111




          23.3k649111













          • Maybe it's the purge? I'll try that - one moment...

            – Charles Green
            5 hours ago











          • I ran with purge, and there's a line that prints specifically stating that it has removed the apparmor profiles!

            – Charles Green
            5 hours ago











          • 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
            5 hours ago






          • 1





            Great! The differences are indicated in man apt. It seems that Dobey did this right :)

            – N0rbert
            5 hours ago











          • 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
            5 hours ago



















          • Maybe it's the purge? I'll try that - one moment...

            – Charles Green
            5 hours ago











          • I ran with purge, and there's a line that prints specifically stating that it has removed the apparmor profiles!

            – Charles Green
            5 hours ago











          • 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
            5 hours ago






          • 1





            Great! The differences are indicated in man apt. It seems that Dobey did this right :)

            – N0rbert
            5 hours ago











          • 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
            5 hours ago

















          Maybe it's the purge? I'll try that - one moment...

          – Charles Green
          5 hours ago





          Maybe it's the purge? I'll try that - one moment...

          – Charles Green
          5 hours ago













          I ran with purge, and there's a line that prints specifically stating that it has removed the apparmor profiles!

          – Charles Green
          5 hours ago





          I ran with purge, and there's a line that prints specifically stating that it has removed the apparmor profiles!

          – Charles Green
          5 hours ago













          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
          5 hours ago





          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
          5 hours ago




          1




          1





          Great! The differences are indicated in man apt. It seems that Dobey did this right :)

          – N0rbert
          5 hours ago





          Great! The differences are indicated in man apt. It seems that Dobey did this right :)

          – N0rbert
          5 hours ago













          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
          5 hours ago





          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
          5 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120452%2fhow-can-i-safely-remove-snap-without-breaking-apparmor%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          數位音樂下載

          When can things happen in Etherscan, such as the picture below?

          格利澤436b