Announcement

Collapse
No announcement yet.

Script to get rid of Snap

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Update to version 2.1.4:
    better late than never - now all scripts test first if the computer has established an internet connection as this is needed.​
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04 +)

    Comment


      #17
      (I'm not sure if this is the best place to give this feedback - perhaps some gitlab equivalent of github issues would be better.)

      I can find no mention of /etc/systemd/system/var-snap-firefox-common-host\x2dhunspell.mount or the link to it in /etc/systemd/system/multi-user.target.wants in the script. By removing /var/snap, the mount fails, but they should go IIUC.
      Regards, John Little

      Comment


        #18
        Question, I've just upgraded to 24.10. I saw in this post that my Firefox and Thunderbird install would default back to the snap version. Do I have to repeat this script once again to get rid of snap? My old Thunderbird install seems to be working (had a shortcut on the desktop). Don't want to break anything if it is unnecessary.
        Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
        _______________________________________________
        Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

        Comment


          #19
          Hi, I just wanted to report that the script also works perfectly fine on the current KDE neon 6.3. Thanks very much for work put in, it's really useful!

          Comment


            #20
            I have tested the script with 24.10 and 25.04 during the past weeks and improved some code regarding broken symbolic systemd links in 24.10​​​.​
            Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
            Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

            get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
            install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04 +)

            Comment


              #21
              Originally posted by Princey View Post
              Question, I've just upgraded to 24.10. I saw in this post that my Firefox and Thunderbird install would default back to the snap version. Do I have to repeat this script once again to get rid of snap? My old Thunderbird install seems to be working (had a shortcut on the desktop). Don't want to break anything if it is unnecessary.
              Better late than never, sorry:

              Yes, you will have to use the get rid of Snap script again after release-upgrading Kubuntu to the next main version. The process is quite painless and does not touch the user data of a non-Snap Firefox or Thunderbird that had been installed before.

              Also see the READ MEs of the get rid of Snap script, the reinstall Snap for release-upgrade script, the install traditional Firefox script and the install traditional Thunderbird script…
              Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
              Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

              get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
              install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04 +)

              Comment


                #22
                Looking through the script, I don't see lines that stand out to me as removing all installed snaps, but rather specific names ones, such as firefox, thunderbird, etc. When looking through a guide to do this manual, it lists several others that it expects to be there that need to be removed. (https://www.debugpoint.com/remove-snap-ubuntu/)

                And I'm wondering what if I have installed some other snaps? Was expecting something like a loop that would cycle through the results of `snap list` and do a `snap remove --purge XXXXX` on each item listed.

                I'm mainly just curious whether there is some tricky way you mass uninstall other snaps, something about the other packages removed just sort of removes some of these other snaps automatically, or if the script can leave a few snaps lingering.

                I have a fairly fresh install, so I think only a couple themes are using snap, based on the results of `snap list`, so this isn't a big deal or anything. But to make it a more concrete question, how does the script handle all of the following:

                Code:
                %snap list
                Name Version Rev Tracking Publisher Notes
                bare 1.0 5 latest/stable canonical✓ base
                core22 20250408 1963 latest/stable canonical✓ base
                firefox 138.0.3-1 6159 latest/stable/… mozilla✓ -
                gnome-42-2204 0+git.38ea591 202 latest/stable/… canonical✓ -
                gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ -
                gtk-theme-breeze 1.3 5 latest/stable/… kde✓ -
                icon-theme-breeze 1.3 5 latest/stable/… kde✓ -
                snapd 2.68.4 24505 latest/stable canonical✓ snapd
                thunderbird 128.10.0esr-1 721 latest/stable/… canonical✓ -

                Unrelated question: does the markdown in this forum provide no support for inline code formatting?

                Comment


                  #23
                  I do believe that uninstalling snap causes all installed snap packages to be uninstalled as well, so there is no need for such actions from the script.


                  You have FF and Tbird installed as snaps with the others listed mainly being dependencies for thsese.

                  The console bbcode is what we use for inline code. It's the $ button. It doesn't use markdown.

                  Code:
                  [console] inline code [/console]
                  inline code

                  Comment


                    #24
                    I'm using the script as a guide to manually purge snap, as a learning exercise to better understand what it does, and found these duplicate lines (257 & 258). The second line will do nothing as the first line removes the target package. But I'm wondering if the second line was meant to be a variant on the same package name. There is a similar pair of lines for packages libsnapd-qt1 and libsnapd-qt-2-1 a few lines down. Or maybe just a copy-pasto (copy paste "typo").

                    Code:
                    if dpkg -l plasma-discover-backend-snap 2> /dev/null | grep "^ii" &> /dev/null ; then echo -e "\n########\n## -> Removing Discover's support for Snap …\n########\n" && sudo apt-get purge -y plasma-discover-backend-snap ; fi
                    if dpkg -l plasma-discover-snap-backend 2> /dev/null | grep "^ii" &> /dev/null ; then echo -e "\n########\n## -> Removing Discover's support for Snap …\n########\n" && sudo apt-get purge -y plasma-discover-snap-backend ; fi

                    Comment


                      #25
                      Only one of the lines you cite will be executed, as both packages (plasma-discover-backend-snap and plasma-discover-snap-backend) wouldn't be installed on the same system.
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #26
                        Originally posted by greylander View Post
                        I'm using the script as a guide to manually purge snap, as a learning exercise to better understand what it does, and found these duplicate lines (257 & 258). The second line will do nothing as the first line removes the target package. But I'm wondering if the second line was meant to be a variant on the same package name. There is a similar pair of lines for packages libsnapd-qt1 and libsnapd-qt-2-1 a few lines down. Or maybe just a copy-pasto (copy paste "typo").

                        Code:
                        if dpkg -l plasma-discover-backend-snap 2> /dev/null | grep "^ii" &> /dev/null ; then echo -e "\n########\n## -> Removing Discover's support for Snap …\n########\n" && sudo apt-get purge -y plasma-discover-backend-snap ; fi
                        if dpkg -l plasma-discover-snap-backend 2> /dev/null | grep "^ii" &> /dev/null ; then echo -e "\n########\n## -> Removing Discover's support for Snap …\n########\n" && sudo apt-get purge -y plasma-discover-snap-backend ; fi
                        The named packages are not typos at all. plasma-discover-backend-snap and plasma-discover-snap-backend is a case where older releases had one package name, which was replaced by the other (the reason is unknown, probably just a naming error at some point in the past, or just to have consistent naming structures). One became a 'transitional' package that simply depends on the other, so that those upgrading will get the new package installed. So those who have upgraded from previous releases a few times might actually have both, or they are still running an old release for some reason.


                        Code:
                        sudo dpkg -l | grep -i transitional
                        This probably will show at least a few "dummy transitional" packages, it is quite common.

                        Originally posted by Snowhog View Post
                        Only one of the lines you cite will be executed, as both packages (plasma-discover-backend-snap and plasma-discover-snap-backend) wouldn't be installed on the same system.
                        They would be, in this case, but only on older releases , before 22.04. Someone who upgraded from 20.04 -22.04-24.04 might theoretically still have the old plasma-discover-snap-backend as an empty 'dummy'.


                        Last edited by claydoh; Yesterday, 09:39 PM.

                        Comment


                          #27
                          Originally posted by claydoh View Post

                          The named packages are not typos at all. plasma-discover-backend-snap and plasma-discover-snap-backend is a case where older releases had one package name, which was replaced by the other (the reason is unknown, probably just a naming error at some point in the past, or just to have consistent naming structures). One became a 'transitional' package that simply depends on the other, so that those upgrading will get the new package installed. So those who have upgraded from previous releases a few times might actually have both, or they are still running an old release for some reason.


                          Code:
                          sudo dpkg -l | grep -i transitional
                          This probably will show at least a few "dummy transitional" packages, it is quite common.


                          They would be, in this case, but only on older releases , before 22.04. Someone who upgraded from 20.04 -22.04-24.04 might theoretically still have the old plasma-discover-snap-backend as an empty 'dummy'.


                          lol, I can't believe*** my eyes did not register the difference snap-backend vs backend-snap!! and here I thought I was being helpful...

                          ***total lie: I can believe it easily

                          Comment

                          Working...