Ubuntu – How to update GNOME Shell extensions from the command line

command linegnome-shell-extensionupdates

Occassionally I get messages telling me there is an update for one of my GNOME Shell extensions, directing me to https://extensions.gnome.org/local/ where I can trigger an update through the web interface.

I would rather invoke updates from the command line, similar to calling apt update && apt upgrade. How can I do this?

Best Answer

The comments on this omgubuntu.co.uk article list two possible ways:

  1. The GNOME Shell Extension Installer · Github, a bash script to install and search extensions from extensions.gnome.org. Install it with

    wget -O gnome-shell-extension-installer "https://github.com/brunelli/gnome-shell-extension-installer/raw/master/gnome-shell-extension-installer"
    chmod +x gnome-shell-extension-installer
    sudo mv gnome-shell-extension-installer /usr/bin/
    

    Update the extensions 23 and 42 for GNOME Shell 3.18.4 with

    ids=( 23 42 )
    gnome=3.18.4
    gnome-shell-extension-installer ${ids[@]} $gnome --yes --update --restart-shell
    

    Update all extensions with

    gnome-shell-extension-installer --yes --update --restart-shell
    

    I couldn’t test it, but I’m pretty sure it’s scriptable.

  2. If you installed your extensions by cloning their git repos to /path/ you can just git pull the repos one after one:

    for i in /path/*; do
      git -C"$i" pull
    done
    

    After that you need to reload GNOME Shell with either Alt+F2 and r or the command gnome-shell -r.