You might find the official wiki page interesting reading if you haven’t seen it already, pkgng – Free BSD Wiki.First let’s install pkgng, (should we be calling it simply ‘pkg’?When you make install a new port, the Free BSD ports system will register the newly installed port with pkg_*.To make the ports instead register with pkg you need to make an add WITH_PKGNG=yes to This is one of the reasons why you cannot use pkgng with the official mirrors yet, this package ‘repo.txz’ and therefore the file ‘repo.sqlite’ does not exist yet.If you want to try pkgng for yourself now you won’t be able to use the official Free BSD package mirrors, but you can use the beta package server at
One of the very cool features of pkgng, you can manage packages in side a jail or chroot from the host OS by providing the Jail ID (JID) or chroot path.You can always do it yourself by writing scripts around the pkg_* tools or using portmaster’s –packages-only option”.While this is all true, there is still a gap for a good package manager that needs filling.Currently supported protocols are FTP, HTTP and HTTPS.OPTIONS The following options are supported by pkg add: ENVIRONMENT The following environment variables affect the execution of pkg add. ASSUME_ALWAYS_YES HANDLE_RC_SCRIPTS PKG_DBDIR FILES See pkg.conf(5). SEE ALSO pkg(8), pkg-audit(8), pkg-autoremove(8), pkg-backup(8), pkg-check(8), pkg-clean(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-info(8), pkg-install(8), pkg-query(8), pkg-register(8), pkg-repo(8), pkg-rquery(8), pkg-search(8), pkg-set(8), pkg-shell(8), pkg-shlib(8), pkg-stats(8), pkg-update(8), pkg-updating(8), pkg-upgrade(8), pkg-version(8), pkg-which(8), pkg.conf(5) Free BSD 10.0 June 12, 2012 Free BSD 10.0 The last man page listed above is for pkg.conf, this is the system-wide confutation file for pkgng’s pkg tools. For more information on the syntax of YAML, please visit the official YAML website – The next thing we see are all the subcommands that we can use, including a useful ‘help’ subcommand that will quickly display the man page (if available for that command).Here’s an exmaple of the help command and the available man pages.For a long time GNU/linux users have always used this as a reason not to use Free BSD and instead favour some GNU/linux combination with an all encompassing easy to use package manager, such as Debian’s apt-get.Free BSD’s response has always been, (not actual quote), “We have the ports collection, which is cooler and more flexible than just having some easy to use package manager.DESCRIPTION pkg add installs a package from either a local source or a remote one.When installing from a remote source you need to specify the protocol to use when fetching the package.