Kubuntu 22.04 – Pending update of “firefox” snap

In the 22.04 version of Ubuntu/Kubuntu, Firefox was switched from a repository to a snap. I don’t know enough about the technical reasons for that, but it does mean that how Firefox is updated has changed. It also introduced a very annoying notification message that you’ve probably seen (and which is why you’re here:

The message says, “Pending update of “firefox” snap. Close the app to avoid disruptions (XX days left).

Switching to a snap is fine, but forcing users to employ a different update method is a bit annoying. Even so, this just requires one line in a console to update Firefox now. You don’t, technically, have to close your Firefox browser to run this as the code will take care of that. Here’s the code:

sudo killall firefox && sudo snap refresh

To explain the code. The first part tells the OS to shut down all instances of Firefox (sudo killall firefox). After that, the two “&&” symbols tell the OS that there is a second command that follows the first. The second command tells the OS to refresh all your snaps (sudo snap refresh). When you run this line of code, you should see the snap downloaded and installed.

Also, the notification message likely won’t go away after running this. It should and I’m not sure why it doesn’t. But you can just click the “X” to make it go away since your snap of Firefox has, in fact, been updated.

(NOTE: I found a solution to this problem here. I put up this post because I like my solution better. It’s a single line of bash script and solves the problem.)

Loading


Posted

in

by

Comments

4 responses to “Kubuntu 22.04 – Pending update of “firefox” snap”

  1. Stephan Avatar
    Stephan

    killall firefox gives a reply that there is no process found
    and snap refresh is stating that all snap’s are up to date.
    So, I take it, Firefox is updated?

    1. rcragun Avatar
      rcragun

      Hi Stephan,

      If “killall firefox” says no process is found, that means Firefox isn’t running. So, no problem there.

      If the “snap refresh” says all snaps are up to date, that means Firefox is updated. So, good to go. You can dismiss the notification.

  2. Keith Bennett Avatar
    Keith Bennett

    Thanks for this, I was not aware of how to update snaps!

    A few improvements…

    The killall should not be necessary if you just exit from Firefox.

    The sudo should not be necessary unless other users are running Firefox, which is unlikely.

    If you _do_ use the two commands, then they should be separated by ‘;’ (a semicolon) and not ‘&&’. The ‘&&’ will not execute the second command if the first fails (specifically, returns an exit code other than zero), and killall considers the absence of process to kill a failure. So, if Firefox is not running when you issue your two commands, the `snap refresh` will not be run.

    In contrast, the semicolon ignores return values and executes the next statement regardless of the result of the first.

    To illustrate:

    % killall firefox; echo $? # Firefox is running
    0

    % killall firefox; echo $? # Firefox is not running
    firefox: no process found
    1

    % killall firefox && echo ‘You will not see this if Firefox is not running’
    firefox: no process found

    % killall firefox ; echo “You will see this because the semicolon doesn’t care”
    firefox: no process found
    You will see this because the semicolon doesn’t care

  3. tcn Avatar
    tcn

    Yes it is possible to simply use this method:
    sudo killall firefox
    sudo snap refresh
    https://linuxlifehacks.com/how-to-fix-the-pending-update-of-firefox-snap

    But also avoid the Firefox snap:
    Uninstall Firefox Snap and Install Firefox via a Different Method.
    https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-from-mozilla-builds-for-advanced-users
    and
    https://sourceforge.net/p/ubuntuzilla/wiki/Main_Page/

Leave a Reply

Your email address will not be published. Required fields are marked *