-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Reinout van Rees wrote:
Debian/ubuntu has a mechanism to clean up packages that were once installed to satisfy dependencies but that aren't needed anymore.
The handiest course of action is probably looking up how they do it. (/me doesn't know now it works internally, btw)
Apt has a file, /var/lib/apt/extended_states, which stores an "Auto-Installed" flag with same semantics as the REQUESTED flag (inverted). Though there are issues with the flag not being set correctly for base-system packages, and not all tools take advantage of the flag, the stored metadata is the same.