PKG.CONF(5) File Formats Manual PKG.CONF(5)

pkg.conf — pkg configuration

/etc/pkg.conf

pkg.conf tells pkg(8) where the ports are. Each line holds a directive and its value, separated by white space. Everything after a ‘#’ is a comment; empty lines are ignored, and so are unknown directives.

The only directive is:

directory
A directory of ports. It may be given any number of times. If two directories have a port of the same name, the one given later is used.

Without a portdir, pkg(8) knows no ports.

/etc/pkg.conf
This file.

The shipped file:

portdir /ports/core
portdir /usr/ports/libs
portdir /usr/ports/devel
portdir /usr/ports/fonts
portdir /usr/ports/python
portdir /usr/ports/perl
portdir /usr/ports/opt

pkg(8), ports(8)

September 27, 2026 pkg 1.4.0