Unable to update "Snap Store": Cannot refresh "snap-store"

avatar
Borislav Hadzhiev

Last updated: Apr 5, 2024
5 min

banner

# Unable to update "Snap Store": Cannot refresh "snap-store"

The Ubuntu error "Unable to update "Snap Store": (null) cannot refresh "snap-store": snap-store has running apps (ubuntu software) pids: X" occurs when you try to update snap-store but the application is already running.

To solve the error, stop the process by running sudo killall snap-store and refresh the application.

unable to update snap store cannot refresh snap store

Here is the complete stack trace:

shell
Unable to update "Snap Store": (null): cannot refresh "snap-store": snap "snap-store" has running apps (ubuntu-software), pids: 12974 snap has no updates available
  1. Open your terminal and run the following command to stop all snap-store processes.
shell
sudo killall snap-store

stop all snap store processes

The killall command enables you to stop all instances of a process based on its name.

  1. Try to refresh snap-store by running the following command.
shell
sudo snap refresh snap-store

refresh snap store success

You can also try running the sudo snap refresh command.

shell
sudo snap refresh

sudo snap refresh

After you run the command, you should get a message that all snaps are up to date.

If you now open the Ubuntu Software application and click on Updates, you will see that snap-store has been updated successfully and is no longer present in the list.

snap store updated successfully

Note that Ubuntu Software and snap-store are two names for the same application.

Therefore if you try to update snap-store using Ubuntu Software, you will get the "snap-store has running apps (ubuntu software) pids: X" error.

If the issue persists, run the following command to get the process ID of snap-store.

shell
ps -e | grep snap-store

get process id of snap store

The screenshot shows that the process ID in the example is 30857. Note that your process ID will be different.

Run the following command to store the process.

shell
kill <YOUR_PROCESS_ID>

stop snap store process by id

Make sure to replace the <YOUR_PROCESS_ID> placeholder with the process ID you got from the previous command.

After you stop the process, refresh snap-store by running the following command.

shell
sudo snap refresh snap-store

refresh snap store success

You can also try running the sudo snap refresh command.

shell
sudo snap refresh

sudo snap refresh

After you run the command, you should get a message that all snaps are up to date.

# Closing Ubuntu Software is not sufficient

When you close the Ubuntu Software (Snap Store) application by clicking on the x icon at the top right corner, it often keeps running in the background.

This causes the error because an invisible snap-store process is still running.

To resolve the issue, you can also:

  1. Start the Ubuntu Software application.

start ubuntu software application

  1. Make sure the application is focused and right-click on Ubuntu Software in the top left corner.

right click ubuntu software close

  1. Click Quit.

  2. After you select Quit, refresh snap-store by running the following command.

shell
sudo snap refresh snap-store

refresh snap store success

You can also try running the sudo snap refresh command.

shell
sudo snap refresh

sudo snap refresh

After you run the command, you should get a message that all snaps are up to date.

# Closing the snap-store process using the System Monitor

If the issue persists, try to close all snap-store processes using the System Monitor application.

  1. Click on Win + A, search for System Monitor and start the application.

search system monitor

  1. Select the Processes tab and press Ctrl + F.

  2. Search for snap-store.

  3. Right-click on the snap-store process and select Kill.

search snap store and stop process

  1. Repeat the steps for each snap-store process if you see multiple processes running.

  2. Try to update snap-store using one of the following commands.

shell
sudo snap refresh snap-store # Or sudo snap refresh

If the issue persists, try to run the following command.

shell
snap-store --quit

snap store quit

After closing snap-store, run one of the following commands.

shell
sudo snap refresh snap-store # Or sudo snap refresh

Here is a single command that combines the two steps.

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

exit snap store and update it

If the error persists, try to run the following 2 commands.

shell
# stop all snap-store processes sudo killall snap-store # update snap-store sudo snap refresh snap-store

stop all snap store processes and update snap store

# Reinstalling Snap-Store

If nothing else worked for you, you have 2 options:

  1. Try to restart your PC and rerun the following commands.
shell
# stop all snap-store processes sudo killall snap-store # update snap-store sudo snap refresh snap-store

stop all snap store processes and update snap store

  1. Reinstall the snap-store application.

If you uninstall and reinstall snap-store, all processes will be stopped and you will automatically install the latest version of the application.

You can remove snap-store by running the following command from your terminal.

shell
# Remove the snap-store application sudo snap remove snap-store

To install snap-store, run the following command.

shell
# Install snap-store sudo snap install snap-store

The error should be resolved after you uninstall and reinstall the snap-store application.

If Nothing else worked, you can try to restart your PC but it is unlikely to help because the snap-store (Ubuntu Software) application starts running in the background upon login.

# Conclusion and why the error occurs

The Ubuntu error "Unable to update "Snap Store": (null) cannot refresh "snap-store": snap-store has running apps (ubuntu software) pids: X" occurs when you try to update snap-store but the application is already running.

This may happen when you try to update snap-store using the Ubuntu Software application.

Note that Ubuntu Software and snap-store are two names for the same application.

Therefore if you try to update snap-store using Ubuntu Software, you will get the error.

Running the following commands from your terminal should solve the error.

shell
# stop all snap-store processes sudo killall snap-store # update snap-store sudo snap refresh snap-store sudo snap refresh

The Snapd package detects when a new version of an application is available and notifies you.

If the application that has to be updated is already running, it cannot be updated, so Snapd postpones updating the application for up to 14 days.

This issue can usually be resolved by closing the application.

If the application is closed, the next time Snapd tries to update it (could take a few hours for it to notice), it should succeed.

If 14 days pass without you closing the snap-store application, then Snapd will terminate the process in order to update the application.

Even if you close the Ubuntu Software application using the X icon, you might still have a snap-store process running which would prevent you from updating it.

If the issue persists, try to run the following command.

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

exit snap store and update it

# Additional Resources

You can learn more about the related topics by checking out the following tutorials: tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.