Files
RankzyLinux/clean.sh
Laszlo Uyttersprot 008e76d0b8 Initial commit
2025-12-11 01:36:40 +01:00

28 lines
538 B
Bash
Executable File

#!/bin/bash
# Arch Linux cleanup + update script
set -euo pipefail
echo "==> Updating packages..."
yay -Syu --noconfirm
echo "==> Removing orphaned dependencies..."
yay -Yc --noconfirm
echo "==> Checking for broken packages..."
yay -Dk
echo "==> Cleaning package cache..."
yay -Sc --noconfirm
echo "==> Cleaning user cache..."
rm -rf ~/.cache/*
echo "==> Emptying trash..."
rm -rf ~/.local/share/Trash/files/*
rm -rf ~/.local/share/Trash/info/*
echo "==> Cleaning system logs..."
sudo journalctl --vacuum-time=7d
echo "==> Done."