Announcement

Collapse
No announcement yet.

/snap taking up a lot of space

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

    #16
    … this was unintentional.
    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
      Haha! Thanks gents, I'll try this tonight when I'm back home.

      The reason I want to clear it is because I've had it a few times where my root partition gets too full and stops me from being able to log in, and snap has been the culprit so I want to keep this to a minimum.

      After I remove Firefox is there anything else worthwhile doing? I think root will have 20gb free afterwards which should be plenty left.

      Comment


        #18
        20GB is plenty unless you are also using that partition for /home.

        If you're low on drive space but good on memory, you can also mount tmpfs in RAM which prevents it from filling up.

        Also, you likely have a swap file which is probably too large unless you hibernate. Like if you have 8GB RAM your swapfile might also be 8GB. You could make it 1GB instead and be fine, as long as you're not suspending/hibernating

        Please Read Me

        Comment


          #19
          Originally posted by oshunluvr View Post
          20GB is plenty unless you are also using that partition for /home.

          If you're low on drive space but good on memory, you can also mount tmpfs in RAM which prevents it from filling up.

          Also, you likely have a swap file which is probably too large unless you hibernate. Like if you have 8GB RAM your swapfile might also be 8GB. You could make it 1GB instead and be fine, as long as you're not suspending/hibernating
          Good to hear, no it's just my root partition, /home is another partition

          Comment


            #20
            Getting rid of snap improved the speed and stability of my system. My cold boot to working Plasma desktop is 10-15 seconds and the only red lines in my systemlogs are two, one for failing to activate wpa signal strength monitoring and a DBus bluez error. Both occurred during boot two hours ago and neither are important.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #21
              I have installed the firefox with the script and deleted the snap version too. The question is.....do I need snap??
              Last edited by CanyonRoss; Mar 31, 2023, 12:20 PM.

              Comment


                #22
                Only if some application you want requires it.

                Please Read Me

                Comment


                  #23
                  Originally posted by oshunluvr View Post
                  Only if some application you want requires it.
                  Apologies for the stupid question, but how do I know if any applications require it? I don't know what require "gnome....." etc?

                  Thanks.

                  Comment


                    #24
                    If you don't use the Snap versions of Firefox and Brave anymore (and currently no other Snaps), you can deinstall every single one of those Snap packages manually (with the snap remove command). If you get an error message during this process just change the deinstallation-order. If you also want to additionally remove all their data use the snap remove --purge command.

                    ->
                    1. But you can keep the snapd binary in your system if you think you would use Snap in the future (the snapd binary installed by the APT package manager - the snapd Snap listed by snap list you can also remove).
                    Then your system would be in an equal state as a standard Kubuntu 20.04 installation: Snap "functionality" (the right word?) installed, but no Snaps.

                    Then if you decide to install a program as Snap in the future this Snap program would reinstall any Snaps it needs as dependencies (e.g. the "gnome-" stuff if it is a GTK-based application like Firefox, GIMP - or the "core" Snap etc.).

                    The only thing you would really have to think of when you will release-upgrade to the next main Kubuntu version (e.g. from 22.04 to 24.04) is to manually remove the APT pinning from /etc/apt/preferences.d for the Firefox binary from the Mozilla PPA if you had installed it (also see: https://www.kubuntuforums.net/forum/...ary#post669551 ).

                    ->
                    2. If you are sure you don't want to use Snaps at all anymore then you can safely use the aforementioned "get_rid_of_Snap" script - but remember to use the "reinstall_Snap_for_release-upgrade" script at the moment you will want to do a release-upgrade to the next main Kubuntu version (e.g. upgrade from 22.04 to 24.04). By the way this will also take care of the Firefox binary from the Mozilla Team PPA for you if you had installed it.

                    … I hope I expressed this in a way which everyone can understand.
                    Last edited by Schwarzer Kater; Mar 31, 2023, 02:42 PM. Reason: added link
                    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


                      #25
                      Originally posted by CanyonRoss View Post

                      Apologies for the stupid question, but how do I know if any applications require it? I don't know what require "gnome....." etc?

                      Thanks.
                      No stupid questions here, but regardless, it's a very valid question if one isn't sure how to tell in advance what may be installed along with whatever package you've selected. This is a part of why I use the console to update and install. I get a clear text listing of anything that's going to be installed and a change to opt out. An answer might be to just do careful checking before installing and even if you miss one, just remove it along with snap again and you're back where you started.

                      AFAIK, there's nothing malicious or dangerous about snapd or snaps, just that we Linux users tend to like demand total control over our systems and snap with all it's add-ons feels intrusive.

                      Please Read Me

                      Comment


                        #26
                        Having searched what core22 is, it sounds like this may be my runtime environment.....sp if I remove this I may risk messing up my KDE Plasma? No?

                        Thanks again.

                        Comment


                          #27
                          No. It is only for other Snaps.
                          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


                            #28
                            Originally posted by Schwarzer Kater View Post
                            No. It is only for other Snaps.

                            Thanks. So I guess my question is really, before I think about removing snap completely, how do I know whether I use any applications that are snaps, and that I won't mess my system up by removing it completely?

                            Thanks again, I very much appreciate your help.

                            Comment


                              #29
                              You won't "mess up your system" - whether you use the get_rid_of_Snap script or do it manually: you would just remove Snaps, the snapd deamon and the Discover support for Snap and block the future installation of Snaps (I guess tenth of thousands of people or more have done this since *Ubuntu 22.04 was released).

                              If you had used the get_rid_of_Snap script or done this manually (like the aforementioned assumed massive number of people) and if you then would try to install a Snap in Konsole you would just get an error message like (I have not memorized the exact words): "could not install, because for snapd no installation candidate does exist" due to the blocking of Snaps by APT pinning like e.g. Linux Mint has already done out of the box successfully for years.
                              And in Discover the Snaps would simply not show up anymore.
                              Nothing "bad" would have happened to your system or your system's stability (I have done this on about a dozen of customer's private and production computers with Kubuntu until today - manually and with scripts).

                              How to get Snap back into your system:
                              If you would decide afterwards that removing and blocking Snap was a bad idea, perhaps due to one very specific program that is only available as a Snap, (OR you wanted to release-upgrade to the next main Kubuntu version - that is what the reinstall_Snap_for_release-upgrade script was primarily written for) simply use the reinstall_Snap_for_release-upgrade script. Afterwards everthing is like before you removed Snaps.
                              -> So the solution would be to just run the reinstall_Snap_for_release-upgrade script (either to simply get Snap back or before a release-upgrade, of course​)

                              How to get Snap back into your system if you have installed the Firefox binary from the Mozilla Team PPA:
                              The above is valid with one exception: if you would have installed the Firefox binary from the Mozilla Team PPA (either with the install_traditional_Firefox script or manually like in the "How To" that oshunluvr wrote) before, now this Firefox binary and the APT pinning and the Mozilla Team PPA would also have been removed by the reinstall_Snap_for_release-upgrade​ script in the course of reinstalling Snap (but all your Firefox user data would have been left untouched!). That is done to keep it as easy as possible for people to have this Firefox binary from the Mozilla Team PPA installed before and after a release-upgrade, so they don't have to do anything "themselves" (the get_rid_of_Snap script will particularly reinstall the Firefox binary from the Mozilla Team PPA after a release-upgrade if it had been installed before).
                              -> So the solution is to just run the install_Firefox_binary script again (or do it manually again like in oshunluvr 's How To) after you used the reinstall_Snap_for_release-upgrade script to get Snap back into your system but did not do a release-upgrade - or after the release-upgrade, of course, if you wanted to keep Snap and Firefox from the Mozilla Team PPA then.


                              How to get Snap back into your system if you have installed the traditional Firefox from Mozilla.org:
                              If you used the traditional Firefox from Mozilla.org (either with the install_traditional_Firefox script or manually as Debian writes in the How To) this really is less complicated as this traditional Firefox does not interfere with Snap at all.
                              -> The solution would be to just run the reinstall_Snap_for_release-upgrade script (either to simply get Snap back or before a release-upgrade, of course)​.

                              … I think I will link this as a little "How To" to the descriptions of my get_rid_of_Snap and reinstall_Snap_for_release-upgrade scripts…
                              Perhaps to the install_traditional_Firefox script description as well.

                              PS: I have tested those procedures "umphteen" times with my scripts.
                              Last edited by Schwarzer Kater; Apr 05, 2024, 05:45 PM.
                              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


                                #30
                                Thanks so much for your help. I have just removed snaps and have freed up around 10GB since the beginning of this thread. Really appreciate your help.

                                Comment

                                Working...
                                X