Initial commit
This commit is contained in:
27
clean.sh
Executable file
27
clean.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/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."
|
||||
Reference in New Issue
Block a user