Skip to content
Avinash H. Duduskar edited this page May 8, 2022 · 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 42 Console

  • 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 -Qqu --color never | sed 's/Get .*//') | sort -u -t' ' -k1,1"
  • Update command : gnome-terminal -- sh -c "yay ; echo Done - Press enter to exit; read"
  • Update command (Gnome 42) : gnome-terminal -- 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 --list | /usr/bin/aur vercmp && /usr/bin/pacman -Qm | /usr/bin/aur vercmp"
  • Update command : gnome-terminal -- bash -c "sudo pacman -Syu && /usr/bin/grep -Fxf <(/usr/bin/pacman -Qq) <(/usr/bin/pacman -Slq customrepo) > ~/installed.txt && /usr/bin/xargs -a ~/installed.txt /usr/bin/aur sync repo -d customrepo; 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}'\""
package-manager='gnome-software --mode updates'
update-cmd='/usr/bin/gnome-terminal -e "sudo dnf upgrade"'
EOF

To be completed (help wanted)

Clone this wiki locally