Results 1 to 7 of 7

Thread: Snap is broken and it needs to be fixed

  1. #1
    Join Date
    Aug 2015
    Beans
    589

    Snap is broken and it needs to be fixed

    Hello guys, I and some other people have created bug reports for snap and I think these bug reports need more eyeballs.

    Bug #2017926 "Unused content snaps not autoremoved"
    Bug #2018626 "Unused dependencies not removed when uninstalling a snap program"
    Bug #2018627 "[Feature Rquest] '--no-cache' command to not cache during uninstallation of snaps"

    I don't really have a problem with Canonical forcing snap on it's users, but I do have a problem if the snap platform isn't ready and it's being forced on us, and it's not ready based on the problems I experienced. I really want to love and use snaps, but Canonical needs to fix these issues:

    1. Uninstalling snaps is a pain in the ass. In apt and flatpak, they have options to auto-remove the software and it's dependencies, but snap doesn't have that, you have to know beforehand what snaps were installed alongside the main snap and one by one uninstall these snaps.

    As a test, I've installed KompoZer. Before I installed KompoZer, this is what my snap list output looks like:

    Code:
    Name               Version          Rev    Tracking         Publisher   Notes
    bare               1.0              5      latest/stable    canonical✓  base
    core               16-2.58.3        14946  latest/stable    canonical✓  core
    core20             20230404         1879   latest/stable    canonical✓  base
    firefox            112.0.2-1        2605   latest/stable/…  mozilla✓    -
    gnome-3-38-2004    0+git.6f39565    140    latest/stable  canonical✓  -
    gtk-common-themes  0.1-81-g442e511  1535   latest/stable/…  canonical✓  -
    snapd              2.59.1           18933  latest/stable    canonical✓  snapd
    After I installed KompoZer, these dependencies were installed: core18 and gtk2-common-themes.

    After I uninstalled KompoZer, the dependencies for KompoZer were still listed in `snap list`:

    Code:
    Name                Version          Rev    Tracking         Publisher   Notes
    bare                1.0              5      latest/stable    canonical✓  base
    core                16-2.58.3        14946  latest/stable    canonical✓  core
    core18              20230320         2721   latest/stable    canonical✓  base
    core20              20230404         1879   latest/stable    canonical✓  base
    firefox             112.0.2-1        2605   latest/stable/…  mozilla✓    -
    gnome-3-38-2004     0+git.6f39565    140    latest/stable/…  canonical✓  -
    gtk-common-themes   0.1-81-g442e511  1535   latest/stable/…  canonical✓  -
    gtk2-common-themes  0.1              13     latest/stable    canonical✓  -
    snapd               2.59.1           18933  latest/stable    canonical✓  snapd
    Snap leaves behind unused dependencies. Snap doesn't have an auto-remove unused dependencies command, you have to remember what dependencies were installed and remove them one by one, which leads me to my second problem.

    2. No history.log for snaps. Apt has history.log, which records what dependencies were installed alongside the software, which I use as a reference in uninstalling software and it's dependencies, in snap, you have to do this manually:

    Code:
    sudo snap install kompozer && snap tasks --last=install --abs-time >> /home/ardouronerous/.snap_history.log
    This command will create a log file that will tell me what dependencies were installed alongside KompoZer, so if I want to uninstall KompoZer, I can uninstall it and all it's unused dependencies using this log file as reference.

    A log file should be created by default without user intervention.

    3. Snap keeps a cache of uninstalled software so you don't have to download the snaps if you decide to reinstall. You could see this as a feature, but if you are low on disk space, this becomes a problem. I wish there was an option not to cache during uninstall.

    As noted in this AskUbuntu post: https://askubuntu.com/questions/1075...aps-from-cache

    Snap keeps a cache of uninstalled software so you don't have to download the snaps if you decide to reinstall. While I can see this as a useful feature, but this becomes an issue if you are low on disk space, to remedy this issue, some users, as noted in the AskUbuntu post, have to run this command in the Terminal to clear the snap cache:

    Code:
    sudo sh -c 'rm -rf /var/lib/snapd/cache/*'
    This cleared about 2GB of space for me. A '--no-cache' command to not cache during uninstallation of a snap should be an option for users who are low on disk space.
    Last edited by ardouronerous; May 9th, 2023 at 11:15 AM.

  2. #2
    Join Date
    Apr 2007
    Location
    Hartford City, Indiana US
    Beans
    1,387
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Snap is broken and it needs to be fixed

    Every time the "snap store" has an update I end up having to kill the process to be able to update it. After a year of running 22.04, I switched to Linux Mint. After being out for a year, I should not have problems with snaps on an LTS release.

  3. #3
    TenPlus1's Avatar
    TenPlus1 is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    May 2005
    Location
    Scotland, UK
    Beans
    926
    Distro
    Lubuntu

    Re: Snap is broken and it needs to be fixed

    Being a beginner distro, Ubuntu should not have these problems in an LTS release at all, which is why I see more and more users leaving for Linux Mint or the more experienced users removing snap altogether.

  4. #4
    Join Date
    Dec 2014
    Location
    USA
    Beans
    397

    Re: Snap is broken and it needs to be fixed

    Quote Originally Posted by TenPlus1 View Post
    Being a beginner distro, Ubuntu should not have these problems in an LTS release at all,
    A problem free Linux distro would be nice.

    I guess I'm one of the lucky ones using Ubuntu 22.04.2 the default Snaps work without problems OOTB on my 2013 curb find.
    Under certain circumstances, profanity provides a relief denied even to prayer.
    (Mark Twain)

  5. #5
    Join Date
    Aug 2013
    Beans
    4,941

    Re: Snap is broken and it needs to be fixed

    The first thing I do after installing Ubuntu is purge snap. Pretty easy to do. I would rather use flatpak.

  6. #6
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: Snap is broken and it needs to be fixed

    Quote Originally Posted by monkeybrain20122 View Post
    The first thing I do after installing Ubuntu is purge snap. Pretty easy to do. I would rather use flatpak.
    And I do likewise except that so far I have only a few appimages for some applications, no flatpacks yet, and have found the direct download of firefox .tar.gz from Mozilla to be very reliable but with my own control of when it upgrades. My chromium comes from a PPA which I've been using for the three or more years since it became a snap meaning I have nothing of the snap infrastructure on any of my systems, all of which work faultlessly.

  7. #7
    Join Date
    Aug 2015
    Beans
    589

    Re: Snap is broken and it needs to be fixed

    Quote Originally Posted by monkeybrain20122 View Post
    The first thing I do after installing Ubuntu is purge snap. Pretty easy to do. I would rather use flatpak.
    Same, I prefer flatpak over snap.

    It's always been a policy of mine to leave default software alone and don't use them, but I kinda want snap to succeed and this is why did those bug reports so that snap improves.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •