18

I tried to update Firefox Snap (from 100 to 101):

sudo snap refresh firefox

but I got a message that an update was pending, but it could not update because Firefox was running an app, although I did close all Firefox windows and I couldn't find anything with pgrep firefox

After a reboot, the update command was working.

So, how do you update Firefox on Ubuntu 22.04 without restarting the system?

Janghou
  • 6,035

2 Answers2

7

I had a similar issue, but I was simply being neglectful about closing Firefox.

However, I recommend using something like pkill firefox or killall firefox in the future to see if that'll close all instances of Firefox to stop it from complaining.

2

Quit the application -- in this case, snap-store (a.k.a. Ubuntu Software). Since snap-store auto-starts upon login, you might not recall that you have it open...but you do.

Closing the window is not enough to terminate the application.

One way: On the command line, run snap-store --quit

Another way: Open Ubuntu Software, look at the top bar, find "Ubuntu Software" on the left side of the top bar. Click it, and select "Quit".

Run sudo snap refresh. Let the command complete.

If, instead of a refresh, you still get a pop-up that the application needs to be refreshed, then run sudo snap refresh firefox. 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.

It's now safe to re-launch your application.

Joepie Es
  • 1,570