FreeBSD 15.0-Release: how to get a listing of installed pkgs – without the pkgbase overhead?

Hi Folks,
as the title says: FreeBSD 15.0-Release, just installed.

me@home:~ $ pkg list| wc -l
1634

Yikes! How to get rid of this pkgbase pkgs spamming the output?
Thx in advance
-cheasy
 
Base packages have base/ prefix in the origin, freebsd-base(7). Pass a list of packages to pkg list, filtered by the origin:
Code:
pkg list `pkg query -e '%o !~ base/*' '%n'`
 
Just as an aside, if you just want to see installed package names, without everything that else that gets installed ( like man, doc, locale) you can use
pkg info
and then grep out the stuff you don't want to see.
 
What about pkg leaf ? Fist come the base packages then list the user's installed prime packages.
That would be pkg prime-list. Your command doesn't differ manually / automatically package installs, but does a reverse dependency check ignoring these install flags.

pkg alias" informs:
pkg prime-list does a pkg query -e '%a = 0' '%n'
pkg leaf does a pkg 'query -e '%#r == 0' '%n-%v'
man pkg-query informs that "%a Returns 1 if the matched package was automatically installed as a dependency of another package, 0 otherwise", while %#r belongs to reverse dependencies.

I think the wanted is pkg query -e '%a = 0 && %o !~ base/*' '%n' / pkg query -e '%a = 0 && %o !~ base/*' '%o', but the question and thread topic are ambiguous…
 
Back
Top