2012/09/24: Automatically installed packages

On FreeBSD, pkg(8), a.k.a "pkgng" tracks an additional bit per package, the "automatic flag". Users of debian's aptitude(8) already know it. It is set, if a package is not installed at explicit request of the user, but pulled in as dependency. When installing from ports, this includes build dependencies as well. Using this additional bit, it is much easier to decide which packages can be cleaned up because they're no longer needed. (The alternative would be to go through all leaf packages and try to remember if they're used.)

When doing a naive upgrade from ports by (forcefully) removing the package to be upgraded and then make install clean, one has to take care that this bit is preserved.

Of course, the best is to add this logic to one's personal update scripts once and for all.