A bash script to perform routine maintenance and cleanup tasks on Arch Linux systems.
- 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
- The script requires root privileges and should be used with care
- Always review the script before running
- Consider backing up important data before system maintenance
- 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
.png)



