See: http://www.freebsd.org/doc/handbook/pkgng-intro.html
IMPORTANT: As of this writing (March 2013) the pkgng repositories are offline, see https://wiki.freebsd.org/pkgng#Availability_of_pkgs_for_Download
BIG WARNING: After converting to the new format, the pkg_install
tools should NOT be used any more. See the link provided above for more details.
FreeBSD 9.1:
# pkg # pkg2ng # echo 'WITH_PKGNG= yes' >> /etc/make.conf
FreeBSD below 9.1:
# pkg_add -r pkg # pkg2ng # echo 'WITH_PKGNG= yes' >> /etc/make.conf
# pkg install $somepackage
# pkg_add -r $somepackage
Package names are case sensitive
Alternatively, locate the package in FreeBSD's servers and download and install manually:
# wget ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-$FREEBSD_VERSION/Latest/$PACKAGENAME.tbz # pkg_add $PACKAGENAME.tbz
# pkg_info
# pkg_delete $PACKAGE-$VERSION
The package version IS required to uninstall, it can be obtained with pkg_info
All packages:
# portupgrade -PP -a
Single package:
# portupgrade -PP $somepackage
The -PP
forces a binary package download instead of building the port.
Requires an updated ports tree, see below.
# portsnap fetch # portsnap update
# freebsd-update -r $RELEASE_VERSION upgrade # freebsd-update install # reboot # freebsd-update install
Replace $RELEASE_VERSION with the actual version, e.g. 9.1 or 8.3-RELEASE.
freebsd-update install
must be run twice, once before and once after rebooting.