The FreeBSD ports tree is the most common method of installing software. With the latest 6.x releases of FreeBSD, the old method of keeping your ports tree updated is now considered obsolete. This guide will teach you how to install and maintain your ports tree using the built-in portsnap utility.
- Local root access on the box or be able to su to root.
- A SSH client such as puTTy or SecureCRT (if you aren’t on the box).
Note: If you are running a previous version of FreeBSD, you will have to install portsnap:
# pkg_add -r portsnap
The first step to using portsnap is to download and extract the latest tree. Even if you already have the ports tree installed (/usr/ports), you will have to download and install the tree again using portsnap.
# portsnap fetch extract
Once this process is complete, you now have the latest version of the ports tree installed.
It’s a good idea to keep your ports tree up-to-date and this should be done at least once a week. To update the tree, just issue the following command:
# portsnap fetch update
Now your ports tree is up-to-date.