ports

sync, list, diff and clean port collections

Synopsis

ports [ -u ] [ collection ...]
ports -l
ports -d
ports -x [ dfsw ] [ collection ...]

Description

ports manages port collections. Collections are configured by files in

/etc/ports/

with .rsync or .git extensions.

Options

-u
Sync port collections from their configured remotes. If one or more collection names are given, only those collections are synced. Requires root.
-l
List all available ports across configured port directories. Prints collection / portname for each port containing a MAKEPKG file.
-d
Diff port tree against installed packages. Lists ports where the MAKEPKG version differs from the installed version.
-x " [" dfsw ]
Clean port directories. Without sub-flags, removes stale package files (keeping the current version).
d
Also remove downloaded source archives.
f
Also remove .footprint files.
s
Also remove .signature files.
w
Also remove work/ build directories.
Sub-flags compose freely: -xdfsw cleans everything. A collection name may be given to restrict the operation.

Configuration

Rsync

/etc/ports/name.rsync

host=rsync.krypt.sh
module=ports
token=<token>

core=/ports/core
opt=/usr/ports/opt
Each key = value pair after host, module, and token maps a remote collection name to a local destination path.

Git

/etc/ports/name.git

url=https://github.com/example/ports.git
branch=main
destination=/usr/ports/opt

Port Directories

ports -l and ports -d scan:
/ports/core
/usr/ports/libs
/usr/ports/devel
/usr/ports/python
/usr/ports/opt
/usr/ports/xorg
/usr/ports/contrib
/usr/local/ports/*/

Files

/etc/ports/
Collection configuration directory.

Exit Status

0 on success, 1 on error or sync failure.

See Also

LLVM musl libc libressl Independent