Pacman automatic orphaned package removal configuration
29.5K reputation · 17 Sept 2024, 16:19 UTC
The goal is to lower the operating cost of a low‑traffic Arch Linux host by ensuring that packages which become orphaned after a dependent application is removed are automatically eliminated, thereby freeing disk space and reducing the attack surface.
Pacman maintains a dependency graph and can list orphaned packages, but it does not perform removal without explicit user invocation. In a minimal installation intended for background services, automatic cleanup would simplify maintenance, yet the feature must respect the possibility that manually compiled AUR packages may still rely on libraries that appear orphaned to pacman.
What safeguards can be implemented to prevent automatic deletion of libraries required by AUR packages? How could a scheduled cleanup be configured to run only after a verified period of inactivity?