Skip to main content.

pkgsrc: The NetBSD Packages Collection

BSD daemon

About pkgsrc

The NetBSD Packages Collection (pkgsrc) is a framework for building third-party software on NetBSD and other UNIX-like systems, currently containing over 7300 packages. It is used to enable freely available software to be configured and built easily on supported platforms.

Latest stable branch: pkgsrc-2008Q2

Latest news

26 Jul 2008 - pkgsrc-2008Q2 released

The pkgsrc developers are very proud to announce the new pkgsrc-2008Q2 branch, which has support for more packages than previous branches. As well as updated versions of many packages, the infrastructure of pkgsrc itself has been improved for better platform and compiler support.

See the release announcement for more information.

13 Apr 2008 - pkgsrc-2008Q1 released

The pkgsrc developers are very proud to announce the new pkgsrc-2008Q1 branch, which has support for more packages than previous branches. As well as updated versions of many packages, the infrastructure of pkgsrc itself has been improved for better platform and compiler support.

See the release announcement for more information.

14 Mar 2008 - More interviews about packaging systems

The second and finishing article with interviews about pkgsrc and alternative packaging systems is available. This issue also provides talks about MidnightBSD mports, GoboLinux and Zero Install:

pkgsrc and the concepts of package management 1997-2007

5 Jan 2008 - pkgsrc-2007Q4 released

The pkgsrc developers are very proud to announce the new pkgsrc-2007Q4 branch, which has support for more packages than previous branches. As well as updated versions of many packages, the infrastructure of pkgsrc itself has been improved for better platform and compiler support.

See the release announcement for more information.


The pkgsrc downloads

Documentation

Supported platforms

pkgsrc consists of both a Source distribution and a Binary distribution for these operating systems. After retrieving the required source or binaries, you can be up and running with pkgsrc in just minutes!

Table 1. Platforms supported by pkgsrc

Platform Date Support Added
NetBSD Aug 1997
Solaris Mar 1999
Linux Jun 1999
Darwin (Mac OS X) Oct 2001
FreeBSD Nov 2002
OpenBSD Nov 2002
IRIX Dec 2002
BSD/OS Dec 2003
AIX Dec 2003
Interix (Microsoft Windows Services for Unix) Mar 2004
DragonFlyBSD Oct 2004
OSF/1 Nov 2004
HP-UX Apr 2007
QNX Oct 2007

Binary distribution

The binary packages that are produced by pkgsrc can be used without having to compile everything from source. NetBSD already contains the necessary tools for managing binary packages, on other platforms you need to bootstrap pkgsrc to get the package management tools installed. A browsable list of packages, including links to available binary packages, is here.

Binary packages are available on ftp.NetBSD.org and its mirrors in the directory /pub/pkgsrc/packages/ (see the pkgsrc guide for more details). If the tools for managing binary packages do not exist on a platform or are too old, they are provided along the binary packages in an archive called bootstrap.tar.gz, which must be extracted in the / directory. Then you can run /usr/pkg/sbin/pkg_add to install binary packages. See the pkgsrc guide for detailed instructions.

Source distribution

You can download the pkgsrc tarball or checkout the latest sources using AnonCVS:

# cvs checkout -rpkgsrc-2008Q2 pkgsrc

(for using AnonCVS service, see Tracking NetBSD-current).

After downloading and/or extracting the sources, installing the bootstrap kit should be as simple as:

# cd pkgsrc/bootstrap
# ./bootstrap

This will use the defaults of /usr/pkg for the prefix and /var/db/pkg for the package database directory. However, these can also be set using command-line parameters (use ./bootstrap --help to see the available options).

Note that when using pkgsrc on a non-NetBSD system, use the bmake command instead of “make” to run the NetBSD make, which is required for correct pkgsrc operation. Simply substitute “bmake” for “make” in pkgsrc documentation.