pkg list `pkg query -e '%o !~ base/*' '%n'` > list.txt
pkg infoThat would beWhat aboutpkg leaf? Fist come the base packages then list the user's installed prime packages.
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.pkg query -e '%a = 0 && %o !~ base/*' '%n' / pkg query -e '%a = 0 && %o !~ base/*' '%o', but the question and thread topic are ambiguous…