A safe, interactive, and comprehensive cleanup script for Arch Linux systems that helps maintain system health and recover disk space.
- 🔄 System Updates - Keeps your system up-to-date with
pacman -Syu - 📦 Orphan Removal - Safely removes unused package dependencies
- 🗑️ Cache Cleaning - Cleans pacman and AUR helper caches (yay/paru support)
- 📝 Journal Management - Vacuums systemd journals (keeps last 2 weeks)
- 👤 User Cache Cleanup - Cleans
~/.cachewhile preserving browser data - 🔗 Broken Symlink Removal - Finds and removes dead symbolic links
- 🗂️ Temp File Cleanup - Removes old files from
/tmpand/var/tmp - 📊 Disk Space Tracking - Shows before/after disk usage statistics
- 🎨 Colorful Output - Easy-to-read colored terminal output
- 🛡️ Safety Features - Interactive confirmation, error handling, and safe defaults
- Arch Linux (or Arch-based distribution)
- pacman (package manager)
- sudo privileges for system operations
- Bash 4.0+
pacman-contrib- Providespaccachefor better cache managementyayorparu- For AUR cache cleaning
# Download the script
curl -O https://raw.githubusercontent.com/Sycorlax/Arch-Linux-System-Cleanup-Script/main/cleanup.sh
# Make it executable
chmod +x cleanup.sh
# Run it
./cleanup.sh