On Wed, Mar 27, 2019 at 09:05:37AM -0700, Thomas Frohwein wrote: > On Wed, Mar 27, 2019 at 07:27:15AM +0000, Adam Steen wrote: > [...] > > I should have been more specific, my use case completes the check in two > > steps > > > > 1. find out whats installed, builds a list of packages > > 2. install whats not installed. > [...] > > If you want to build a list of installed packages from a current installation > and install the same packages on different computer or at a later point, you > could use pkg_add(1) with -z and -l to use a file created by pkg_info -m > > file > as the input. See man page for pkg_add(1). > > If you want to install every single available package, I'm not sure if there's > a way and the use case for this escapes me. You could probably get the full > list of all available packages with a (text) browser from the directory index > of one mirrors, format it (e.g. removing '\.tgz.*' with regex) and feed that > to > pkg_add -z -l ... but I would question your use case and/or sanity...
The stem info as reported by pkg_info -zm *is* usually what you want. Because it is rather hard to install the (more or less) *exact* same set of packages later on on another machine. The -z flag in pkg_info takes care of awkward things like version branches and flavors...