Alternative for ports-mgmt/pkg_cutleaves

pkg_cutleaves works for pkg-ng if you set WITH_PKGNG...

This was added back in 2009 ... It should probably be updated to auto-detect this, or something, now that people are actually using pkg-ng...
 
SirDice said:
pkg-autoremove(8) may have some of its functionality.

Many thanks for the hint. I guess, I will use this one for cleaning-up in the regular ports update sequence.

vg said:

I just installed and ran ports-mgmt/pkg-rmleaf and I found it a very nice replacement for ports-mgmt/pkg_cutleaves. Many thanks for the pointer.

Carpetsmoker said:
pkg_cutleaves works for pkg-ng if you set WITH_PKGNG...

This was added back in 2009 ... It should probably be updated to auto-detect this, or something, now that people are actually using pkg-ng...

Well, maybe in theory. In practice it shows me ports that are not installed anymore. I made the switch to pkgng one month ago, and of course I ran pkg2ng and set WITH_PKGNG=yes in /etc/make.conf, otherwise nothing would have worked.
 
This simple query shows installed ports that nobody is depending on and are by definition leaf ports:

pkg query -e "%#r=0" %n-%v

I've noticed over time that pkg-autoremove(8) doesn't catch all leaf ports because for some reason ports that are pulled in as dependencies do not get flagged as automatic. The above query would catch those ports as well.
 
Back
Top