summaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authorl3wdfut4pwr <l3wdfut4pwr@gmail.com>2026-06-14 19:29:33 +0300
committerl3wdfut4pwr <l3wdfut4pwr@gmail.com>2026-06-14 19:29:33 +0300
commit56082af20a8712570edd6ed523baad4755ecd241 (patch)
tree2366ad69de817a80403cdcbe5cdd48ad90106bd6 /update.sh
init
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/update.sh b/update.sh
new file mode 100755
index 000000000..64b2e881d
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+set -e
+
+sudo -v
+
+sudo pacman -Syu --noconfirm
+
+yay -Syu --noconfirm
+
+sudo paccache -r
+
+yay -Scc --noconfirm || true
+rm -rf ~/.cache/yay/*
+
+#rm -rf ~/Downloads/*
+
+rm -rf ~/.cache/*
+
+sudo fd . /tmp --max-depth 1 \
+ --type f --type d \
+ --exclude 'systemd-private-*' \
+ --changed-before 7d \
+ -0 | while IFS= read -r -d '' item; do
+ rm -rf -- "$item"
+done
+
+sudo fd . /var/tmp --max-depth 1 \
+ --type f --type d \
+ --exclude 'systemd-private-*' \
+ --changed-before 7d \
+ -0 | while IFS= read -r -d '' item; do
+ rm -rf -- "$item"
+done
+
+sudo rm -rf ~/.local/share/Trash/*
+
+sudo pacman -Qdtq | sudo pacman -Rns - || true
+
+sudo journalctl --vacuum-time=3d