Working with FreeBSD’s ports
- Fetch and update your ports collection:
portsnap fetch
portsnap extract # first time only
portsnap update # subsequently(this takes some time)
- Find the packages you want to install/upgrade:
Find out-of-date packages:
pkg_version -v
Find a new package:
whereis port-i-want
- Change to the directory for the port you want to install:
cd /usr/ports/path-to/port-i-want
- Install it:
make install clean
- Upgrading installed ports using
portmaster
:portmaster
needs to be installed before use:cd /usr/ports/ports-mgmt/portmaster
make install cleanYou can list all the installed ports and search for updates using the -L option:
portmaster -L
All the installed ports can be upgraded at once:
portmaster -a
- Cleaning up:
See Using the Ports Collection in the FreeBSD Handbook for more details