Announcement

Collapse
No announcement yet.

Script to get rid of Snap

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

    #31
    Thanks for the info on upgrading without having to install snaps John.

    If you want to try adding Mozilla's repos so you can use apt to install firefox from them, see: "Install Firefox .deb package for Debian-based distributions (Recommended)" here:
    https://support.mozilla.org/en-US/kb...ns-recommended
    I find it very fast to install that way. Also you can install the ESR or developer editions from the same repo.

    Comment


      #32
      Hello,

      I've just registered to ask this question.

      I'm testing several distros with KDE but I don't really like Snaps and how they get in the way. But several people on KDE forums convinced me to give Kubunutu a try and remove Snap using this script. I attempted to do this manually but I break things. I tried Kubuntu in the past and had all sorts of issues with Snaps. On a server I can remove Snaps and snapd and it never comes back, no problems.

      I'm trying to run this script and it's not working. I'm probably missing something stupidly obvious as I don't use Linux daily so my skills may be a bit rusty.

      Kubuntu 25.04
      VMWare Workstation Pro 17.6.4
      Fresh, full installation and all updates applied as recommended in the instructions with:
      sudo apt update && sudo apt full-upgrade
      ... including the few phased ones.

      I tried it on a virgin install without updates too, same result.

      I can run other shell scripts in the same directory (/home/anon/Scripts), but not this one.

      I downloaded the actual file from the GitLab page, didn't use copy and paste, so the name is exactly as in the instructions.

      I tried different permissions from 700 to 777 and the executable bit is enabled. The checkbox is checked in Dolphin file properties.

      So here is what happens.

      When I execute as me:

      anon@kubuntuvm:~/Scripts$ ./Kubuntu_get_rid_of_Snap.sh
      bash: ./Kubuntu_get_rid_of_Snap.sh: cannot execute: required file not found

      When I sudo:

      anon@kubuntuvm:~/Scripts$ sudo ./Kubuntu_get_rid_of_Snap.sh
      [sudo] password for anon:
      sudo: unable to execute ./Kubuntu_get_rid_of_Snap.sh: No such file or directory

      I've no idea what's going on.

      Thank you!​

      Comment


        #33
        Hello stranger!

        I feel dumb, but I think the problem IS the file you created or downloaded.

        The error cannot execute: required file not found can indicate a few things, but a common one is missing the required #!/bin/bash at the beginning of the script, which IS present in the file. Another one could be the wrong line formatting in a text editor set to use DOS line endings instead of UNIX style.

        This stack exchange post explains it.
        https://unix.stackexchange.com/a/721845
        and
        https://www.youtube.com/watch?v=yvzaTcWkbGI

        So this is my guess as to the cause. But I can't say how, as downloading the file and opening it in Kate or kwrite, or almost any text editors in Linux would not do that. And simply downloading (not opening it in a text editor) shouldn't, either. It is not a common issue.

        Sure you can run a command to convert the file. But it might be just as easy to download the file, either downloading the entire git files (just a few text files) as a zip and extracting the script inside Kubuntu, or what I did was simply downloaded the file itself, from Firefox in the VM, to a directory in the VM, change permissions using dolphin, then running it in the terminal.


        Last edited by claydoh; Oct 02, 2025, 06:33 AM.

        Comment


          #34
          Hello

          Thank you.

          Weird. I downloaded the file as well as copied raw text inside the VM, not on my Windows host, but inside Kubuntu host using Kate. The #!/bin/bash is absolutely there in the beginning. Besides, I often edit my .sh scripts using Notepad++ on Windows and I never had any issues and I use quite a few scripts on my home servers so I doubt that Notepad++ messes up the line breaks.

          I'm gonna re-do this again but I need to put my testing on hold for a while as VMWare causes my Windows Explorer to misbehave badly. I tried VirtualBox but that also made my Explorer laggy and unstable. I either have some Explorer extension that conflicts or it's something with my virtualization setting in the BIOS.

          I gave away my old testing PC so I need to put a PC together or install another SSD for dual boot. It might be a day or two. It's better to test on actual hardware anyway.

          I'll be back with the results.

          Cheers!

          Comment


            #35
            So I didn't want to wait. I have an older PC (i7 6700K) that should be sufficient for testing for now. It has an NVME SSD and even has NVIDIA, it's only 1050, but the latest 580 driver still supports it.

            So anyway, yeah, the script ran without any issues. I re-downloaded it, all inside Kubuntu. It asked me a bunch of questions and then rebooted. Snap is gone and so far everything works. I've installed most of my software, either from Ubuntu repo or from Flathub.

            So far, so good.

            Software is very recent and installing NVIDA drivers took few clicks.

            Damn, it's so much more responsive than Windows 11.

            I wonder if it's even worth testing OpenSUSE, Endeavor or CachyOS at this point. I already test drove Fedora for a while, and, Snap aside, the experience is smoother on Kubuntu. Cachy's claims of superior performance are intriguing but is it really? I may try it out of curiosity but I really feel more comfy on the Debian/Ubuntu side of things.

            Thanks for your help and the author for this script!

            Comment


              #36
              On a side note, selecting the minimal install option during Kubuntu's install does not install snaps, it's basically a blank slate to start using and with a "sudo apt hold snapd" it should never install anything snap related afterwards, although having a script handy to install the official Firefox .deb would be a good option.

              Comment


                #37
                Originally posted by tenplus1 View Post
                On a side note, selecting the minimal install option during Kubuntu's install does not install snaps, it's basically a blank slate to start using and with a "sudo apt hold snapd" it should never install anything snap related afterwards, although having a script handy to install the official Firefox .deb would be a good option.
                Interesting, I used to install a minimized Ubuntu server then just needed to install few things. Maybe that is a cleaner option? But this script appears to be very thorough in what it does. I learned to install Firefox and Thunderbird from the Mozilla tarballs anyway since many distros only offer the ESR versions and getting that "fixed" is usually PITA.

                Comment


                  #38
                  I tried installing a minimal system, out of curiosity, and too much stuff is missing. I simply don't know what I need to reinstall as it's not just applications, but likely some libraries or frameworks or somethings else are missing. So, this is for more advanced users. It's too much for me

                  For example, I can install Flatpak apps, but they won't run. Or, any software installed, regardless of the source, doesn't appear in the Application Launcher.

                  So I'm gonna do a normal install and then use the script. That seems to work well. Thanks!

                  Comment

                  Users Viewing This Topic

                  Collapse

                  There are 0 users viewing this topic.

                  Working...
                  X