Show HN: Arch-Cleaner – A bash script to routine maintenance on Arch Linux

4 months ago 11

A bash script to perform routine maintenance and cleanup tasks on Arch Linux systems.

usage

  • System updates
  • Removal of orphaned packages
  • Pacman cache cleaning
  • Journal log cleaning
  • Temporary file removal
  • User cache cleaning
  • Arch Linux or Arch-based distribution
  • Bash shell
  • Root privileges
git clone https://github.com/antonio-foti/arch-cleaner.git cd arch-cleaner chmod +x arch-cleaner sudo cp arch-clenear /usr/local/bin/
sudo rm /usr/local/bin/arch-cleaner
  • Updates all packages (pacman -Syyu)
  • Removes orphaned packages
  • Cleans package cache (pacman -Scc)
  • Removes unused packages
  • Cleans systemd journal logs (keeping last 50MB)
  • Removes temporary files
  • Cleans user cache directories
  1. The script requires root privileges and should be used with care
  2. Always review the script before running
  3. Consider backing up important data before system maintenance
  4. Some operations (particularly the optional ones) are potentially destructive

Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.

MIT License - Free to use and modify Created by Antonio Foti

Read Entire Article