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