125

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)
karel
  • 110,292
  • 102
  • 269
  • 299
ABHILASH T
  • 1,513
  • 3
  • 5
  • 12

4 Answers4

173

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

karel
  • 110,292
  • 102
  • 269
  • 299
  • 10
    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 '22 at 12:37
  • Needed the System Monitor version - killall snap didn't capture the snap-store app. All updated now - Thx – Matthew Hudson Sep 07 '22 at 08:57
  • 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 '22 at 09:36
  • @koralgooll Edited. Thank you. – karel Sep 14 '22 at 10:49
  • 3
    This command worked to me: `sudo killall snap-store && sudo snap refresh snap-store` – rmmariano Sep 14 '22 at 14:07
  • I think it should be `pkill` – Mohammad Etemaddar Sep 19 '22 at 08:22
  • Thanks! It works. – mununki Dec 17 '22 at 05:36
  • karel, thanks so much!!! ```sudo pkill snap-store && sudo snap refresh snap-store``` is what did the trick for me. – Cool124 Feb 16 '23 at 02:09
  • `pkill` s a bit over the top, you can use `snap-store --quit` to make it stop gracefully. – popey Feb 20 '23 at 01:29
  • This works but the problem keeps reappearing with each snap-store update. Is there a way resolve this permanently? – Calimo May 10 '23 at 07:35
  • @Calimo The way resolve this problem permanently is by performing all software updates via the terminal. [This answer](https://askubuntu.com/a/1290308/) shows how to rerun any command in your bash history by typing one or two keys. This makes it much easier to use the terminal. – karel May 10 '23 at 10:08
47

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
27

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
davidebaro
  • 379
  • 2
  • 2
2

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
Dina
  • 41
  • 6