Pending Update of Snap Store

13,844

Solution 1

There are a couple things happening.

First, let's talk about the EASIEST way to make the notification go away:

  1. Quit the application (in this case, snap-store [a.k.a. Ubuntu Software]). You might not recall that you have it open, but you do. Maybe it's minimized. Find it and Quit the application.

  2. Run sudo snap refresh. Let the command complete.

    • If, instead of a refresh, you get a pop-up that the application needs to be refreshed, then run sudo snap refresh <application-name>.
      The output of that command will return the PID causing the block.
      Use kill <pid> to remove the block.
      Run sudo snap refresh again. This time it should work.
  3. Re-launch your application.

Second, let's talk about WHY it's happening:

Snapd detects when a new version is available. If the application is currently running, snapd will inhibit updating that application for up to 14 days.

With most applications, this works fine. You Quit out of an application, a few hours later snapd updates the application (it checks several times each day). and the next time you open the application you don't even notice that it's been updated. Great!

But some applications are open for a long time that runs up against that 14-day window. Like web browsers on laptops that get closed/suspended instead of quit/restarted. Unfortunately, when the 14-day window expires, snapd will kill the application in order to implement the upgrade. To the user, this looks like Firefox crashed unexpectedly, losing whatever they were doing.

  • Snapd MUST refresh snaps. That's a legacy of the original design; snaps were originally designed for phones and IOT devices that MUST work reliably and MUST update reliably without user input. You can disable it if you know how...but it's a bad idea for must users -- disabling updates means no security patches and insecure applications.

Third, let's talk about why you are suddenly getting these notifications NOW.

The Snap developers were dissatisfied with those two choices (kill the application to force the upgrade -or- disable upgrades entirely), so they created a better path: Remind the user to Quit the application. That is the notification you are seeing. It's new (turned on by default) in Ubuntu 22.04.

  • If you ignore it, then when the countdown reaches zero snapd will terminate the application and refresh that snap automatically.

Finally, there's one obvious question remaining: Why doesn't snapd download the update before nagging you?

Well, that's a work in progress. The snapd developers welcome code contributions to help make that happen safely. Snapd is Open Source.

Solution 2

Works for me:

  1. Kill "snap" at System Monitor
  2. sudo apt update && sudo apt upgrade
    
  3. sudo snap refresh
    

Solution 3

Close all apps in your Ubuntu. Open Ubuntu Software app, under updates section, update the apps one by one. This trick worked for me.

Solution 4

# Close all open `snapd` process
sudo killall -s KILL snapd
sudo snap refresh

Solution 5

In my case was a "Pending update of 'deja-dup" snap...'" so my two penny solution is open a terminal and type:

sudo killall deja-dup-monitor
sudo snap refresh
deja-dup&

(latest command runs deja-dup's GUI so that deja-dup-monitor is automatically restarted)

Share:
13,844
Josh
Author by

Josh

Learned how to code when I tried to start an online business after college. The business failed basically instantaneously, but I found a love for code that's lasted and come to impact the way I think about entrepreneurship and many other things in life. More about me here: general bio I was in the 2014 summer batch at Hacker School, now The Recurse Center, which was incredible! I had never met any other developers before, I didn't know how to pronounce gif (I still don't)... not to mention, it's an incredible community for developers. These days I work mostly with scientists, NASA, the National Science Foundation, etc, by designing and facilitating 5-day innovative research conferences. Tons of fun : ) Check out Knowinnovation for more. Looking forward to Q&amp;A'ing with everyone here.

Updated on January 05, 2023

Comments

  • Josh
    Josh over 1 year

    What's with 'Pending Update of Snap Store?'

    enter image description here

  • Admin
    Admin almost 2 years
    so to disable it, run this: snap set core experimental.refresh-app-awareness=false
  • Admin
    Admin almost 2 years
    @xinthose disabling is also possible, but puts you back on the hey-my-application-keeps-crashing-at-the-worst-possible-time path. Feel free to add your own answer explaining the command, the reasons, and the consequences.
  • Admin
    Admin almost 2 years
    What a mess. Requiring desktop users to run sudo terminal commands for a simple software update.
  • Admin
    Admin almost 2 years
    @OrganicMarble well, perhaps less than might appear on the surface. This particular case is unusual -- most folks don't leave snap-store running for weeks on end. For a snap like Firefox that many folks do leave running, it can be refreshed from within the snap-store instead of using terminal.
  • Admin
    Admin almost 2 years
    Thanks, this is helpful to know. It would be more helpful if there was a way to "close and update now" for apps that you keep open pretty much permanently, but this is definitely an improvement over how it worked before.
  • Admin
    Admin almost 2 years
    @ChrisSimpson hence the "Finally," paragraph.
  • Admin
    Admin almost 2 years
    this is what worked for me. thanks!
  • Admin
    Admin almost 2 years
    or killall snap-store
  • Admin
    Admin almost 2 years
    @user535733 This notification appears on a fresh install of Ubuntu 22.04, without the snap store open (maybe it's somehow running in the background by default, but there's no visible sign that it's open). It's annoying to constantly see notifications asking one to close an app that doesn't even appear to be open.
  • Admin
    Admin almost 2 years
    Same issue with "emacs". On "You may not remember you have it open" -- yes I did. And I'd like to keep it running more than 14 days! But I quit it to humor Snap. Confirmed with ps -C emacs that it's gone. When I run sudo snap refresh it states "All snaps up to date" but at the same time it pops up the message, 'Pending update of "emacs" snap -- Close the app to avoid disruptions (6 days left)'. But I did close it!! Leaving it open indeed leads to disruptions; e.g., emacs suddenly won't know any character encodings, so you cannot save your open files any more.
  • Admin
    Admin almost 2 years
    @Quigi edited the answer to address how to handle the pop-up.
  • Admin
    Admin almost 2 years
    @user535733 thanks, this worked. It's still not clear why I had to kill dbus-launch and the dbus daemon to convince snap that emacs was really closed, or if some other aplication might miss dbus. But it did the trick!
  • Admin
    Admin almost 2 years
    On slow connections, the download of a new web browser version can take a few minutes. I don't want to be without my web browser that long. If the app runs when the download is finished, I just get an error message, and on the next try it just starts the download again :-/
  • Admin
    Admin almost 2 years
    @PaŭloEbermann it is unclear how either of those issues is related to the original question or to this answer. Also, keep in mind that this is the wrong place to discuss bugs or to provide developer feedback. Comments on this answer should discuss how to improve this answer.