Skip to content
Avinash H. Duduskar edited this page May 16, 2024 · 44 revisions

Command line examples for arch-update

Defaults (updated 2022-01)

  • Check command : /usr/bin/checkupdates
  • Update command : gnome-terminal -- sh -c "sudo pacman -Syu ; echo Done - Press enter to exit; read"

Gnome Console (42+) instead of Gnome Terminal

  • Check command : /usr/bin/checkupdates
  • Update command : kgx -e '/bin/sh -c "sudo pacman -Syu ; echo Done - Press enter to exit; read _" '

Add AUR Support

pamac

  • Check command : pamac checkupdates -aq
  • Update command : gnome-terminal -- sh -c "pamac-manager --updates"

paru

  • Check command : /bin/sh -c "/usr/bin/checkupdates; /usr/bin/paru -Qua"
  • Update command : gnome-terminal -- sh -c "paru; echo Done - Press enter to exit; read"
  • Update command (with terminator) : terminator -e 'paru; echo Done - Press enter to exit; read '

yaourt

  • Check command : /bin/sh -c "(/usr/bin/checkupdates; /usr/bin/yaourt -Qu -a | cut -c 5-) | sort -u -t' ' -k1,1"
  • Update command : gnome-terminal -- sh -c "yaourt -Syua ; yaourt -C ; echo Done - Press enter to exit; read"

pacaur

  • Check command : /bin/sh -c "/usr/bin/checkupdates; /usr/bin/pacaur -Qqu -a"
  • Update command : gnome-terminal -- sh -c "pacaur -Syu ; echo Done - Press enter to exit; read"
  • Update command (with terminator) : terminator -e 'pacaur -Syu ; echo Done - Press enter to exit; read '

aurman

  • Check command : /bin/sh -c "/usr/bin/checkupdates; /usr/bin/aurman -Qqu"
  • Update command : gnome-terminal -- sh -c "aurman -Syu ; echo Done - Press enter to exit; read"
  • Update command (with terminator) : terminator -e 'aurman -Syu ; echo Done - Press enter to exit; read'

trizen

  • Check command : /bin/sh -c "/usr/bin/checkupdates; /usr/bin/trizen -Qqu -a"
  • Update command : gnome-terminal -- sh -c "trizen -Syu ; echo Done - Press enter to exit; read"
  • Update command (with terminator) : terminator -e 'trizen -Syu ; echo Done - Press enter to exit; read'

yay

  • Check command : /bin/sh -c "(/usr/bin/checkupdates; /usr/bin/yay -Qu --color never | sed 's/Get .*//') | sort -u -t' ' -k1,1"
  • Update command for Gnome < 42 : gnome-terminal -- sh -c "yay ; echo Done - Press enter to exit; read"
  • Update command for Gnome >= 42 : kgx -e '/bin/sh -c "yay ; echo Done - Press enter to exit; read"'

pikaur

  • Check command : /bin/sh -c "/usr/bin/checkupdates; /usr/bin/pikaur -Qqua 2>/dev/null"
  • Update command : gnome-terminal -- sh -c "pikaur -Syu ; echo Done - Press enter to exit; read"

aurutils

  • Check command : /bin/sh -c "/usr/bin/checkupdates; /usr/bin/aur repo -d customrepo --upgrades"
  • Update command : gnome-terminal -- bash -c "sudo pacman -Syu && aur sync -d customrepo $(paclist aurpkgs | awk '{print $1}'); echo Done - Press enter to exit; read _"

Add Flatpak Support

  • Check command : /bin/sh -c "/usr/bin/checkupdates; /usr/bin/flatpak remote-ls --columns=application -a --updates"
  • Update command : gnome-terminal -e 'sh -c "sudo pacman -Syu; flatpak update; echo Done - Press enter to exit; read" '

To auto refresh the flatpak check after an update an empty file with user permissions can be used in the pacman local directory path. I.e gnome-terminal -e 'sh -c "sudo pacman -Syu; flatpak update; touch /var/lib/pacman/local/flatpak-arch-update; echo Done - Press enter to exit; read" '

Support for other distros than Arch

Fedora / Redhat (DNF)

  • Check update command - /bin/bash -c "/usr/bin/dnf check-update --refresh -yq | tail -n +2 | grep -E 'x86_64|i686|noarch' | awk '{print $1}'"
  • Update command - /usr/bin/gnome-terminal -e "sudo dnf upgrade"
  • Open Package Manager - gnome-software --mode updates

Single command to load settings:

dconf load /org/gnome/shell/extensions/ << EOF
[arch-update]
check-cmd="/bin/bash -c \"/usr/bin/dnf check-update --refresh -yq | tail -n +2  | grep -E 'x86_64|i686|noarch' | awk '{print $1}' ; /usr/bin/flatpak remote-ls --columns=application -a --updates\""
package-manager='gnome-software --mode updates'
disable-parsing=true
pacman-dir=''
update-cmd='/usr/bin/gnome-terminal -e "sudo dnf upgrade ; /usr/bin/flatpak update; sleep 10" '
EOF

To be completed (help wanted)