pkgsrc logo

Portable Package Management

pkgsrc is a framework for building over 20,000 open source software packages. It is the native package manager on SmartOS, NetBSD, and Minix, and is portable across 23 different operating systems. Use one package manager across all of your systems!

Joyent provide binary packages for SmartOS/illumos, macOS, Linux, and NetBSD.


Bootstrap From Source

1. Fetch pkgsrc

pkgsrc is primarily distributed using CVS, however there are git mirrors if you prefer.

2. Perform bootstrap

Use the bootstrap script to build a set of pkg tools under a specific prefix.

: Get the latest pkgsrc.  Use -r to fetch a particular branch.
$ export CVS_RSH=ssh
$ cvs -d anoncvs@anoncvs.netbsd.org:/cvsroot co -P pkgsrc

: Or with git.  Check out a particular branch, or stay on trunk for the latest.
$ git clone https://github.com/NetBSD/pkgsrc.git
$ cd pkgsrc
$ git checkout pkgsrc-2019Q4
: To build a pkgsrc installation in your home directory.
$ cd pkgsrc/bootstrap
$ ./bootstrap --prefix=${HOME}/pkg --unprivileged
$ PATH=${HOME}/pkg/sbin:${HOME}/pkg/bin:${PATH}
$ MANPATH=${HOME}/pkg/man:${MANPATH}

: Bootstrap has many options, use --help to show them.
$ ./bootstrap --help