summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.local/bin/upgrade10
1 files changed, 10 insertions, 0 deletions
diff --git a/.local/bin/upgrade b/.local/bin/upgrade
new file mode 100755
index 0000000..e6955eb
--- /dev/null
+++ b/.local/bin/upgrade
@@ -0,0 +1,10 @@
+#!/usr/bin/bash
+
+# Upgrade system
+sudo pacman -Syu
+
+# Remove orphans
+mapfile -t orphans < <(pacman -Qdttq)
+if (( ${#orphans[@]} )); then
+ sudo pacman -Rns "${orphans[@]}"
+fi