TheFreeBSD Ports collection is apackage management system for theFreeBSDoperating system. Ports in the collection vary with contributed software. There were 38,487 ports available in February 2020[1] and 36,504 in September 2024.[2] It has also been adopted byNetBSD as the basis of itspkgsrc system.
Theports collection usesMakefiles arranged in adirectory hierarchy so that software can bebuilt,installed and uninstalled with themake command. When installing an application, very little (if any) user intervention is required after issuing a beginning command such asmake install ormake install clean in the ports directory of the desiredapplication. In most cases the software is automatically downloaded from theInternet,patched andconfigured if necessary, thencompiled, installed and registered in the package database. If the new port has neededdependencies on other applications or libraries, these are installed beforehand automatically.
Most ports are already configured withdefault options which have been deemed generally appropriate for most users. However, these configuration options (calledknobs) can sometimes be changed before installation using themake config command, which brings up a text-based interface that allows the user to select the desired options.
Historically, each port (or software package) has beenmaintained by an individualport maintainer who is responsible for ensuring the currency of the port and providing general support. Today, many ports are maintained by special task forces or sub-projects, each with a dedicatedmailing list (e.g. kde@FreeBSD.org, java@FreeBSD.org, etc.), while unmaintained ports are assigned to the generic group ports@FreeBSD.org. In general, anyone may become a port maintainer by contributing their favorite software to the collection. One may also choose to maintain an existing port with no active maintainer.[3]
Precompiled (binary) ports are calledpackages. A package can be created from the corresponding port with themake package command; pre-built packages are also available for download from FreeBSD-hosted package repositories. A user can install a package by passing the package name to thepkg install command. This downloads the appropriate package for the installed FreeBSD releaseversion, then installs the application, including any software dependencies it may have. By default, packages are downloaded from the main FreeBSD Package Repository (pkg.freebsd.org), but if there are any troubles after updating packages, previous version of packages cannot be installed because the repository denies subfolders indexes. In this case, a user must upgrade the OS version to the latest release and install latest packages.
FreeBSD maintains abuild farm called thepointyhat cluster in which all packages for all supportedarchitectures and majorreleases are built. The buildlogs and known errors for all ports built into packages through the pointyhat cluster are available in adatabase[4] and weekly builds logs are also available through mailing list archives.[5]
These pre-compiled packages are separated into categories by the architectures for which they are available. Packages are further separated into several "release" directories, one for each currentproduction release built from the ports collection and shipped with the release. These production release directories are never updated.
There are alsostable andcurrent directories for several major release branches. These are updated more or less weekly. In most cases a package created for an older version of FreeBSD can be installed and used on a newer system without difficulty since binary backward compatibility across major releases is enabled by default.
A packaging system for binary packages[6] calledpkg has replaced the package management system inFreeBSD 10.[7]
Jordan Hubbard committed hisport make macros to the FreeBSD CVS repository on August 21, 1994.[8] His package install suiteMakefile had been committed a year earlier (August 26, 1993).[9] The core ports framework was at first maintained by Hubbard along with Satoshi Asami for several years. The Ports Management Team was later formed to handle this task.
NetBSD's pkgsrc andOpenBSD's ports collection trace their roots to FreeBSD.
Since its release, 3.6DragonFly BSD project uses FreeBSD Ports as a base for its ownDPorts ports collection. John Marino of DragonFly BSD project createdDeltaPortsrepository – a collection of patches and files that overlay and modify the FreeBSD Ports, in order to generate DPorts.[10][11]