FreeBSD pkg_add

A utility for installing software package distributions. This uses packages, not ports.

Download package from FreeBSD mirrors
pkg_add -r bash
Install package list from stdin
echo bash | pkg_add -
Ignore dependencies
pkg_add --no-deps bash
pkg_add -i bash
Perform a dry run
pkg_add --dry-run bash
pkg_add -n bash

OpenBSD pkg_add

Setup package repository

Before you can install anything from OpenBSD's FTP repos, set the PKG_PATH variable. You can set it in .profile to make life easy.

export PKG_PATH=`uname -r`/packages/`uname -p`
Install a package
pkg_add bash
Do a dry-run of an installation
pkg_add -n rsync