Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Why doesn't Ubuntu Update SNAPs during reboot

  1. #1
    Join Date
    Oct 2013
    Location
    London, Ontario, Canada
    Beans
    145
    Distro
    Ubuntu 22.10 Kinetic Kudu

    Question Why doesn't Ubuntu Update SNAPs during reboot

    I have found it necessary every time it is suggested that I reboot to issue the command "sudo snap refresh". If I do not do that then the various snaps will not be up to date. Since like many users I spend much of my day accessing services through a browser the updates to the Firefox and Chrome browsers will be held up,

    Why does the Ubuntu reboot process not automatically invoke snap refresh while there are guaranteed to be no conflicts with running processes, and the reboot has root authority?

  2. #2
    #&thj^% is offline I Ubuntu, Therefore, I Am
    Join Date
    Aug 2016
    Beans
    Hidden!

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    I used to use:
    Code:
     snap changes
    That will shed some light.
    Post that back here to see.

    But I may not be of any more help to you, because I killed snapd, and all that goes with it......R.I.P Snaps

  3. #3
    Join Date
    Oct 2013
    Location
    London, Ontario, Canada
    Beans
    145
    Distro
    Ubuntu 22.10 Kinetic Kudu

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    I sympathize with fellow users who dislike Canonical's use of snaps or would prefer they move to flatpaks. However I also understand that they are making this move because it is desired by their paying customers. I have the freedom to switch to other Debian distros, such as Mint, but Canonical's behaviour is not annoying enough to justify the effort after almost a quarter century since I first installed Ubuntu from a PC Magazine DVD. I want a way to move forward, not sideways or backwards. So I choose to suggest that Canonical can improve their support of snaps.

    $ snap changes
    ID Status Spawn Ready Summary
    494 Done today at 15:46 EDT today at 15:48 EDT Refresh snap "firefox"


    This is a consequence of my issuing "sudo snap refresh" today after the recommended reboot.

    Why do I have to manually issue "sudo snap refresh"?

  4. #4
    #&thj^% is offline I Ubuntu, Therefore, I Am
    Join Date
    Aug 2016
    Beans
    Hidden!

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    Quote Originally Posted by 7-webmaster View Post

    Why do I have to manually issue "sudo snap refresh"?
    Best place to ask: https://forum.snapcraft.io/t/i-canno...snaps/23690/12

    BTW I need no sympathy, I could not be happier.
    Last edited by #&thj^%; April 18th, 2024 at 10:20 PM.

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    Odd, I was supposed to reboot after patching on Saturday morning, but I haven't gotten around to it yet.
    Code:
    $ uptime
     17:06:51 up 26 days,  8:13,
    I have a few snaps, but I control when they are allowed to update - only on Saturdays, which usually means a little after midnight local time. If I could, I'd prevent all automatic snap updates from happening. I prefer for updates not to happen when they are inconvenient to me or users. That means never during a weekday. I've disabled all alerts/nags.

    You don't need to reboot until you are ready. If you don't like the nags, disable them. Get into the habit of patching only 1 day a week, when it is most convenient for you and your workflows. Nothing prevents that.

    Code:
    # ##############################################
      #   Prevent 4x a day snap update checks.
      sudo snap set system refresh.timer=sat
       Much more snap update and retention is here:
       Https://snapcraft.io/docs/keeping-snaps-up-to-date
    Keep only 2 copies of a snap, not 3 or more
    Code:
    # Keep only the current and last version of a snap # snapd v2.34
      sudo snap set system refresh.retain=2
      Https://www.linuxuprising.com/2019/04/how-to-remove-old-snap-versions-to-free.html
    If you want to prevent a specific snap from updating,
    Code:
     $ snap refresh --hold firefox
    I've tried this with some big, complex, server snap packages and it doesn't seem to work, but perhaps that's a problem on my side. IDK.

    To old all snaps from updating ...
    Code:
     $ snap refresh --hold
    I need to see if this actually works.
    Code:
     $ snap refresh --unhold
    to allow updates. It could be the answer to my snap i-want-to-update-all-the-time problem.

    Those notes might be helpful to you as well.

  6. #6
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    The GUI utility Software Updater should run apt update; apt upgrade; apt autoremove and snap refresh.

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  7. #7
    Join Date
    Oct 2013
    Location
    London, Ontario, Canada
    Beans
    145
    Distro
    Ubuntu 22.10 Kinetic Kudu

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    The only time that I am not running Firefox is immediately after a reboot. I am on Ubuntu 23.11 at the moment, and was asked to reboot to install the updates. As soon as the system was rebooted I did a snap refresh which demonstrated that Canonical had not bothered to incorporate snap refresh along with other updates. I still wish to understand WHY I am required to perform a manual snap refresh. I understand from the history why Canonical cannot perform a snap refresh of a product which is being used. However I also do not understand why Canonical does not pre-fetch the HUGE snap file, so that all that snap refresh needs to do is apply it. Why do I have to wait for almost a GIGABYTE file to be retrieved? Why is Canonical stealing MY time?


  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    By default, snaps are checked for updates 4x every day. Why would you bother manually updating snaps if you want them updated daily.

    I only allow the snap system to update on Saturdays. At 12.01 AM early Saturday morning, the logs show all the snaps on a system being checked for updates.
    As I posted above - Https://snapcraft.io/docs/keeping-snaps-up-to-date explains it.

    It is only a waste of time if you allow it to be a waste of time. Why not automate patching and snap updates? It isn't hard.

  9. #9
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,989

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    Quote Originally Posted by 7-webmaster View Post
    Why does the Ubuntu reboot process not automatically invoke snap refresh [...]?
    It can...if you create a systemd or cronjob to do so.

    For every complaint that snaps aren't updating at boot automatically, there are balancing complaints that their boot is taking too long, that "big brother" has usurped control, etc.
    There is simply no single design that will make everybody happy.

    So you are welcome to customize a solution that works best for you.
    And you are welcome to contribute that solution back into the community.

  10. #10
    Join Date
    Oct 2013
    Location
    London, Ontario, Canada
    Beans
    145
    Distro
    Ubuntu 22.10 Kinetic Kudu

    Re: Why doesn't Ubuntu Update SNAPs during reboot

    You obviously did not read the post with which I opened this thread "The only time that I am not running Firefox is immediately after a reboot." If you are going to take the time to respond, please respond to the post, not to what you imagine the post asked.

    It does no good to periodically check for snap updates because Canonical has decided that it will not update a snap if the associated application is running. The obvious reason for not performing the snap refresh is that the running instances of the browser would otherwise continue to run on the old version of the snap. Like many users I spend my entire day on my browser because I am a web developer and I have deployed all of my tools and services on my web site. As a web developer I spend my entire working life testing the web site, which I can only do if I am on a browser because it is a web-site. So it does not matter how often Canonical checks for snap updates, every single time it does it finds that Firefox is running, and so defers the update to the next opportunity. I do not like to shut down the browser because I typically have a dozen or more tabs open and shutting down the browser will kill every single task that I am in the middle of working on. Even if I go to sleep when I wake up I want to continue from wherever I left off. The only time that I am not in the browser is when I am requested to reboot to apply updates. So since Canonical has promised that it will apply all of the outstanding fixes if I just reboot, I clean up whatever windows I can, and then "sudo killall firefox" so as to retain as much information about my open tabs as possible.

    So please explain to me why, when Canonical explicitly asked me to reboot for the explicit purpose of taking advantage of all outstanding updates to my system, does that not include the proliferating snaps? How am I expected to read the minds of the snap afficionadoes at Canonical to know that I must do a "sudo killall firefox" every time I am going to be away from my computer for more than a few hours?

Page 1 of 2 12 LastLast

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
  •