Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.69 KB

File metadata and controls

43 lines (32 loc) · 1.69 KB

🧹 Arch Linux System Cleanup Script

A safe, interactive, and comprehensive cleanup script for Arch Linux systems that helps maintain system health and recover disk space.

License: MIT Arch Linux

✨ Features

  • 🔄 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 ~/.cache while preserving browser data
  • 🔗 Broken Symlink Removal - Finds and removes dead symbolic links
  • 🗂️ Temp File Cleanup - Removes old files from /tmp and /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

📋 Requirements

  • Arch Linux (or Arch-based distribution)
  • pacman (package manager)
  • sudo privileges for system operations
  • Bash 4.0+

Optional Dependencies

  • pacman-contrib - Provides paccache for better cache management
  • yay or paru - For AUR cache cleaning

🚀 Installation

Option 1: Direct Download

# 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