A lightweight CLI utility to keep your Arch Linux system clean and organized.
- Orphan Removal: Identifies and removes unused dependencies (
pacman -Qtdq). - Cache Cleaning: Cleans package cache using
paccache(keeps 3 versions) or falls back topacman -Sc. - Partial Downloads: Removes
.partfiles from/var/cache/pacman/pkg/. - Config Files: Lists
.pacnewand.pacsavefiles in/etc/for manual review. - Dry Run:
--dry-runflag to simulate actions without making changes (default safety mechanism).
- Clone this repository:
git clone https://github.com/ranjanssgj/arch-cleaner.git cd arch-cleaner - Build and install:
makepkg -si
Copy arch_cleaner.py to your path:
sudo install -Dm755 arch_cleaner.py /usr/bin/arch-cleanerRun arch-cleaner from the terminal. Sudo privileges are required for actual cleanup operations.
# Run all checks in dry-run mode (safe, prints what would happen)
arch-cleaner --all --dry-run
# Run specific checks
arch-cleaner --remove-orphans --dry-run
arch-cleaner --clean-cache --dry-run
arch-cleaner --check-configs
# Execute cleanup (requires sudo/root)
sudo arch-cleaner --allGPL-3.0