On Mon, Jun 25, 2007 at 03:56:49PM +0100, Edd Barrett wrote: > Hi there, > > Another idea I forget to suggest in my post last week was a mode for > pkg_delete similar to -F, excepct for it works in the other direction, > but stops if it finds other packages which need the candidate. > > for example: > > package A is some low level text manipulation library. > package B is a music player. Depends upon A. > package C is another library which deals with http requests. Depends upon A. > package D is a web browser depends upon C. > > pkg_delete -F prune D > > Should delete package D and C too, but stop at A as package B requires it. > > Hopefully that makes sense. > > Thoughts?
With recent tools, stored pkg_info will keep track whether you installed the package manually, or whether it got installed as a dependency. I'm still checking whether there are bugs in what gets recorded. Afterwards, it's just a question of deleting whatever is still on your box that used to be dependencies for stuff you actually need, but that you never recorded as installed... grep for @option manual-install in /var/db/pkg/*/+CONTENTS to see which packages get annotated...