Last updated: Apr 5, 2024
Reading time·5 min
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.
Here is the complete stack trace:
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
snap-store
processes.sudo killall snap-store
The killall
command enables you to stop all instances of a process based on
its name.
snap-store
by running the following command.sudo snap refresh snap-store
You can also try running the sudo snap refresh
command.
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.
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
.
ps -e | grep 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.
kill <YOUR_PROCESS_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.
sudo snap refresh snap-store
You can also try running the sudo snap refresh
command.
sudo snap refresh
After you run the command, you should get a message that all snaps are up to date.
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:
Click Quit.
After you select Quit, refresh snap-store
by running the following
command.
sudo snap refresh snap-store
You can also try running the sudo snap refresh
command.
sudo snap refresh
After you run the command, you should get a message that all snaps are up to date.
snap-store
process using the System MonitorIf the issue persists, try to close all snap-store
processes using the System
Monitor application.
Win
+ A
, search for System Monitor and start the
application.Select the Processes tab and press Ctrl
+ F
.
Search for snap-store.
Right-click on the snap-store
process and select Kill
.
Repeat the steps for each snap-store
process if you see multiple processes
running.
Try to update snap-store
using one of the following commands.
sudo snap refresh snap-store # Or sudo snap refresh
If the issue persists, try to run the following command.
snap-store --quit
After closing snap-store
, run one of the following commands.
sudo snap refresh snap-store # Or sudo snap refresh
Here is a single command that combines the two steps.
snap-store --quit && sudo snap refresh snap-store
If the error persists, try to run the following 2 commands.
# stop all snap-store processes sudo killall snap-store # update snap-store sudo snap refresh snap-store
If nothing else worked for you, you have 2 options:
# stop all snap-store processes sudo killall snap-store # update snap-store sudo snap refresh snap-store
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.
# Remove the snap-store application sudo snap remove snap-store
To install snap-store
, run the following command.
# 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.
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.
# 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.
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.
snap-store --quit && sudo snap refresh snap-store
You can learn more about the related topics by checking out the following tutorials: tutorials: