Re: How to reinstall *ALL* pkgs

From: Steve O'Hara-Smith <steve_at_sohara.org>
Date: Wed, 18 Oct 2023 13:17:05 UTC
On Wed, 18 Oct 2023 05:20:06 -0700
"Edward Sanford Sutton, III" <mirror176@hotmail.com> wrote:

> On 10/17/23 22:10, Steve O'Hara-Smith wrote:
> > On Tue, 17 Oct 2023 16:11:46 -0700
> > "Edward Sanford Sutton, III" <mirror176@hotmail.com> wrote:
> > 
> >>     `pkg query -e '%a = 0' %o` is the more complete "I installed this"
> 
> To correct myself, `pkg prime-origins` is the same as `pkg query -e '%a 
> = 0' %o` on my system with v1.20.8; `pkg alias` reveals that; could have 
> sworn there was a difference somewhere. prime-origins seems to return 
> manually installed nonleaf packages

	The %a = 0 clause means that it returns all packages that are not
marked as auto installed so yes it will indeed return manually installed
non-leaf packages.

> > 	I usually use pkg leaf which expands to
> > 
> > pkg query -e '%#r == 0' '%n-%v'
> > 

	The %#r == 0 clause means that it will return all packages that
nothing depends on.

>    `pkg leaf` includes package version #s and pkg doesn't check for 

	True - I usually wind up removing the version bit which is a PITA.

	pkg-prime-origins also includes the category.

-- 
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/
Host: Beautiful Theory meet Inconvenient Fact
Obit: Beautiful Theory died today of factual inconsistency