How can I update GNOME Shell extensions from the command line?

Solution 1:

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.

  1. 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.