From 56082af20a8712570edd6ed523baad4755ecd241 Mon Sep 17 00:00:00 2001 From: l3wdfut4pwr Date: Sun, 14 Jun 2026 19:29:33 +0300 Subject: init --- update.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 update.sh (limited to 'update.sh') 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 -- cgit v1.3-3-g829e