From bfc3c69cf125edac3e01ffcec2e2689b857f875e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 19 Jan 2026 10:49:46 -0500 Subject: [PATCH 1/2] Update AUR packages after system pkgs + migrate As AUR packages need local compiling and that might fail. Which shouldn't prevent migrations from running. --- bin/omarchy-update-aur-pkgs | 24 ++++++++++++++++++++++++ bin/omarchy-update-perform | 1 + bin/omarchy-update-system-pkgs | 12 ------------ 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100755 bin/omarchy-update-aur-pkgs diff --git a/bin/omarchy-update-aur-pkgs b/bin/omarchy-update-aur-pkgs new file mode 100755 index 00000000..2f47dbc7 --- /dev/null +++ b/bin/omarchy-update-aur-pkgs @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +# Update AUR packages if any are installed +if pacman -Qem >/dev/null; then + if omarchy-pkg-aur-accessible; then + echo -e "\e[32m\nUpdate AUR packages\e[0m" + yay -Sua --noconfirm --ignore gcc14,gcc14-libs + echo + else + echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m" + echo + fi +fi + +orphans=$(pacman -Qtdq || true) +if [[ -n $orphans ]]; then + echo -e "\e[32m\nRemove orphan system packages\e[0m" + for pkg in $orphans; do + sudo pacman -Rs --noconfirm "$pkg" || true + done + echo +fi diff --git a/bin/omarchy-update-perform b/bin/omarchy-update-perform index c4fcc2cb..afdf64a0 100755 --- a/bin/omarchy-update-perform +++ b/bin/omarchy-update-perform @@ -14,6 +14,7 @@ omarchy-update-keyring omarchy-update-available-reset omarchy-update-system-pkgs omarchy-migrate +omarchy-update-aur-pkgs omarchy-hook post-update omarchy-update-analyze-logs diff --git a/bin/omarchy-update-system-pkgs b/bin/omarchy-update-system-pkgs index 814fb491..b8aaf6e0 100755 --- a/bin/omarchy-update-system-pkgs +++ b/bin/omarchy-update-system-pkgs @@ -5,18 +5,6 @@ set -e echo -e "\e[32m\nUpdate system packages\e[0m" sudo pacman -Syyu --noconfirm -# Update AUR packages if any are installed -if pacman -Qem >/dev/null; then - if omarchy-pkg-aur-accessible; then - echo -e "\e[32m\nUpdate AUR packages\e[0m" - yay -Sua --noconfirm --ignore gcc14,gcc14-libs - echo - else - echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m" - echo - fi -fi - orphans=$(pacman -Qtdq || true) if [[ -n $orphans ]]; then echo -e "\e[32m\nRemove orphan system packages\e[0m" From 4701726c83a3ab2ebfe582df46d1c25c2be76f0a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 19 Jan 2026 12:21:06 -0500 Subject: [PATCH 2/2] Split out removing orphan packages as well And make sure failed AUR update doesn't fail the update entirely --- bin/omarchy-update-aur-pkgs | 11 ----------- bin/omarchy-update-orphan-pkgs | 10 ++++++++++ bin/omarchy-update-perform | 1 + bin/omarchy-update-system-pkgs | 9 --------- 4 files changed, 11 insertions(+), 20 deletions(-) create mode 100755 bin/omarchy-update-orphan-pkgs diff --git a/bin/omarchy-update-aur-pkgs b/bin/omarchy-update-aur-pkgs index 2f47dbc7..0e5c9d53 100755 --- a/bin/omarchy-update-aur-pkgs +++ b/bin/omarchy-update-aur-pkgs @@ -1,7 +1,5 @@ #!/bin/bash -set -e - # Update AUR packages if any are installed if pacman -Qem >/dev/null; then if omarchy-pkg-aur-accessible; then @@ -13,12 +11,3 @@ if pacman -Qem >/dev/null; then echo fi fi - -orphans=$(pacman -Qtdq || true) -if [[ -n $orphans ]]; then - echo -e "\e[32m\nRemove orphan system packages\e[0m" - for pkg in $orphans; do - sudo pacman -Rs --noconfirm "$pkg" || true - done - echo -fi diff --git a/bin/omarchy-update-orphan-pkgs b/bin/omarchy-update-orphan-pkgs new file mode 100755 index 00000000..3d7a3511 --- /dev/null +++ b/bin/omarchy-update-orphan-pkgs @@ -0,0 +1,10 @@ +#!/bin/bash + +orphans=$(pacman -Qtdq || true) +if [[ -n $orphans ]]; then + echo -e "\e[32m\nRemove orphan system packages\e[0m" + for pkg in $orphans; do + sudo pacman -Rs --noconfirm "$pkg" || true + done + echo +fi diff --git a/bin/omarchy-update-perform b/bin/omarchy-update-perform index afdf64a0..c2101c15 100755 --- a/bin/omarchy-update-perform +++ b/bin/omarchy-update-perform @@ -15,6 +15,7 @@ omarchy-update-available-reset omarchy-update-system-pkgs omarchy-migrate omarchy-update-aur-pkgs +omarchy-update-orphan-pkgs omarchy-hook post-update omarchy-update-analyze-logs diff --git a/bin/omarchy-update-system-pkgs b/bin/omarchy-update-system-pkgs index b8aaf6e0..36a78418 100755 --- a/bin/omarchy-update-system-pkgs +++ b/bin/omarchy-update-system-pkgs @@ -4,12 +4,3 @@ set -e echo -e "\e[32m\nUpdate system packages\e[0m" sudo pacman -Syyu --noconfirm - -orphans=$(pacman -Qtdq || true) -if [[ -n $orphans ]]; then - echo -e "\e[32m\nRemove orphan system packages\e[0m" - for pkg in $orphans; do - sudo pacman -Rs --noconfirm "$pkg" || true - done - echo -fi