172

I am a new Ubuntu 22.04 user who is facing an issue with the Snap Store. Whenever I try to update the Snap Store I can see these error messages.

enter image description here

Pending update of "snap-store" snap 
Close the app to avoid disruptions (13 days left)

error 2

Unable to update "Snap Store": 
(null): cannot refresh "snap-store": snap "snap-store" has 
running apps (ubuntu-software)
0

5 Answers 5

249

Sometimes the snap-store process starts in the background and stays open with 0% CPU usage even if the user did not actually launch the Snap Store application in the current session. For example, this would be the case if the following notification appeared on your desktop one or two minutes after booting Ubuntu.

enter image description here

If you opened the System Monitor it would show that the snap-store process had started automatically and was running. Ending the snap-store process would enable you to update the snap-store by running the following command, or alternatively a notification would appear that the snap-store has been updated would appear immediately after the snap-store process was ended.

sudo snap refresh

Alternatively to end the snap-store process so that the snap-store snap can be updated run the following command.

snap-store --quit && sudo snap refresh snap-store

If snap-store --quit doesn't work then force end the snap-store process from the System Monitor and run sudo snap refresh snap-store.

After the snap-store has been refreshed you may receive a notification in the notification area next to the clock that says "snap-store" snap has been refreshed. Now available to launch.

enter image description here

12
  • 11
    Thanks! When I ran this command, I propted that snap-store was running, so I kill them and try again like: sudo killall snap-store && sudo snap refresh
    – LuisComS
    Jul 26, 2022 at 12:37
  • 2
    Be careful with copy paste, you could update everything. Which could be not intended. Use this sudo killall snap && sudo snap refresh snap-store.
    – koralgooll
    Sep 14, 2022 at 9:36
  • 3
    This command worked to me: sudo killall snap-store && sudo snap refresh snap-store
    – rmmariano
    Sep 14, 2022 at 14:07
  • 1
    pkill s a bit over the top, you can use snap-store --quit to make it stop gracefully.
    – popey
    Feb 20, 2023 at 1:29
  • 1
    While running snap-store --quit && sudo snap refresh snap-store I encountered error: snap "snap-store" has "auto-refresh" change in progress so I waited a minute, then reopened snap-store (Ubuntu Software) to see on the Updates tab the friendly Up To Date screen, hooray!
    – pzrq
    Mar 12 at 21:33
60

I had the same problem with a fresh install of Ubuntu 22.04 LTS.

The accepted answer did not work for me, so I solved with:

$ sudo killall snap-store
$ sudo snap refresh snap-store
7
  • 2
    I had to do the sudo snap refresh snap-store to get it refreshed. Thanks
    – Mattijs
    Sep 8, 2022 at 18:14
  • 3
    This worked for me when Snap updater was complaining Snap was running. Sep 10, 2022 at 12:37
  • 5
    this should be the accepted answer
    – alfx
    Sep 14, 2022 at 10:29
  • 1
    After those commands snap-store can be restarted with snap run snap-store &
    – Kidquick
    Sep 23, 2022 at 21:05
  • 1
    That is the correct answer. Isn't there a community feature to correct "accepted answer" somehow?
    – foo
    Mar 7 at 12:13
28

I had the same problem and managed to solve it today removing the snap-store with:

sudo snap remove snap-store

and then re-installing it with:

sudo snap install snap-store
3
  • 1
    This worked for me. Sep 12, 2022 at 1:24
  • 3
    It's the only brute force that worked for me. It suppressed some packages. Hope no harm done. By Jove, it is quite disgracious, I say!
    – ross minet
    Sep 12, 2022 at 18:09
  • 2
    If you have to go to Google to figure out how to do something like this, the product needs improvement... Mar 9, 2023 at 14:11
3

In my case there is pids show up

$ sudo snap refresh snap-store
error: cannot refresh "snap-store": snap "snap-store" has running apps (snap-store), pids: 3452
$ kill 3452
$ sudo snap refresh snap-store
snap-store 41.3-71-g709398e from Canonical✓ refreshed
2

To avoid the issue above and other related snap-store bugs and failings, a couple of months ago I removed snap-store:

snap remove snap-store

This leaves the snap system intact, but just removes the troublesome snap-store.

Instead I now use gnome-software which manages snaps perfectly without any of the above issues. gnome-software also has the advantage that it handles flatpak and DEB packages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .