30 September 2024 - pkgsrc-2024Q3 released
The pkgsrc developers are proud to announce the pkgsrc-2024Q3 branch, the 84th pkgsrc release.
See the release announcement for more information.
30 June 2024 - pkgsrc-2024Q2 released
The pkgsrc developers are proud to announce the pkgsrc-2024Q2 branch, the 83rd pkgsrc release.
See the release announcement for more information.
4 April 2024 - pkgsrc-2024Q1 released
The pkgsrc developers are proud to announce the pkgsrc-2024Q1 branch, the 82nd pkgsrc release.
See the release announcement for more information.
1 January 2024 - pkgsrc-2023Q4 released
The pkgsrc developers are proud to announce the pkgsrc-2023Q4 branch, the 81st pkgsrc release.
See the release announcement for more information.
28 September 2023 - pkgsrc-2023Q3 released
The pkgsrc developers are proud to announce the pkgsrc-2023Q3 branch, the 80th pkgsrc release.
See the release announcement for more information.
pkgsrc is a framework for managing third-party software on UNIX-like systems, currently containing over 26,000 packages. It is the default package manager of NetBSD and SmartOS, and can be used to enable freely available software to be built easily on a large number of other UNIX-like platforms. The binary packages that are produced by pkgsrc can be used without having to compile anything from source. It can be easily used to complement the software on an existing system.
pkgsrc is very versatile and configurable, supporting building packages for an arbitrary installation prefix, allowing multiple branches to coexist on one machine, a build options framework, and a compiler transformation framework, among other advanced features. Unprivileged use and installation is also supported.
NetBSD already contains the necessary tools for using pkgsrc; on other platforms you need to bootstrap pkgsrc to get the package management tools installed.
Table of contents:
quickstart
install binary packages (NetBSD)
Set the PKG_PATH
and install pkgin
if it isn't installed already:
# PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f '1 2' -d.)/All/"
# export PKG_PATH
# pkg_add pkgin
Note that the "release" field of the URL should be something like 9.2, not 9.2_STABLE.
pkgin is the primary high level tool for managing pkgsrc binary packages, designed to be familiar to users of other package managers such as apt:
# pkgin search nginx
nginx-1.19.6 Lightweight HTTP server and mail proxy server
nginx-1.18.0nb8 Lightweight HTTP server and mail proxy server
# pkgin install zsh nginx-1.19.6 vim
# pkgin upgrade
A browsable web index of NetBSD packages is available.
install binary packages (illumos, macOS, Enterprise Linux)
Binary package sets for SmartOS/illumos, macOS, NetBSD current, and Enterprise Linux are available from MNX.
install source packages
get pkgsrc
You can checkout pkgsrc HEAD with CVS:
$ CVS_RSH=ssh cvs [email protected]:/cvsroot checkout -P pkgsrc
Or pkgsrc's stable branch:
$ CVS_RSH=ssh cvs [email protected]:/cvsroot checkout -r pkgsrc-2024Q3 -P pkgsrc
Or download pkgsrc from HTTP:
bootstrap
On operating systems other than NetBSD, and on NetBSD with non-default settings (e.g. different installation PREFIX), pkgsrc first needs to bootstrap (build and install its tools).
$ cd pkgsrc/bootstrap
$ ./bootstrap --prefix /opt/pkg-2024Q3 --prefer-pkgsrc yes --make-jobs 4
build a package
Dependencies will be automatically downloaded, built, and installed.
$ cd pkgsrc/devel/memcached
$ bmake install clean
On a non-bootstrapped NetBSD installation, bmake
is simply make
.
Built packages can then be managed with exactly the same tools as binary packages (pkgin, pkg_info, etc).
Various tools exist to automate the building and installation of pkgsrc packages, including pbulk, pkg_chk, and pkg_rolling-replace.
start packaging yourself
Take a look at pkgsrc-wip if you want to contribute by packaging software yourself!
community and support
We use the NetBSD mailing lists pkgsrc-users and tech-pkg. If you don't want to subscribe, you can browse via web or NNTP, and post without a subscription. There is also a #pkgsrc IRC channel on the Libera IRC chat network.
If you want to report a bug, use the NetBSD bug reporting tool and select the pkg category.
There is a pkgsrc account on Twitter.
We used to have pkgsrcCon in the real world, but then the world ended.
security
For getting the latest package vulnerabilities database and checking your installed packages against it, use
# pkg_admin fetch-pkg-vulnerabilities
$ pkg_admin audit
The vulnerabilities database and package EOL database are both signed with the pkgsrc-security GPG key.
A hardening guide is also available.
resolving problems
For issues with the change in default PKG_DBDIR, which can manifest in hard-to-understand ways, see the PKGDB change page.
platforms pkgsrc runs on
More details about how pkgsrc works on various platforms are in
bootstrap/README
in the pkgsrc sources, and per-platform notes are
in bootstrap/README.${platform}
. pkgsrc aims to be portable and
works better on platforms that people actively use it on.
primary focus
These platforms have many active users and active bulk builds.
other supported platforms
Code exists in pkgsrc to support 20+ Unix-like operating systems and 15+ CPU architectures.
Operating systems that receive occasional testing include
FreeBSD, OpenBSD, DragonFlyBSD, MINIX 3, SCO OpenServer/UnixWare,
HP-UX. See the various platform-specific README
files in
bootstrap/
for more information.
Please report your experiences trying pkgsrc on unusual platforms to the pkgsrc-users mailing list, complete with bootstrapping and build logs. Try to provide as much detail as possible - particularly for proprietary platforms, developers may not have access to a test environment.
information for developers
- Quarterly Branch Planning and Freeze Policy
- Freeze Status
- Outdated packages in pkgsrc
- Outdated perl packages in pkgsrc
- BulkTracker - bulk build reports