Managing the Ports Tree with Portsnap

General Information

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.

Requirements

  1. Local root access on the box or be able to su to root.
  2. A SSH client such as puTTy or SecureCRT (if you aren’t on the box).

Installation

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.

Usage

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.

Speak Your Mind

*