It is recommended that to keep FreeBSD systems up to date with the latest application security patches installed via ports collection. But, how to upgrade all packages under FreeBSD?

FreeBSD comes with various tools to to install and update software packages. The portmaster command line tool is used to install and update software packages. There are four steps here. Most of the actions listed in this FAQ are written with the assumption that they will be executed by the root user running the csh or bash shell.

  • Update FreeBSD Ports Tree
  • List All Outdated Packatges FreeBSD Ports Tree
  • Read /usr/ports/UPDATING File
  • Upgrade All Packages / Ports / Apps

All the details step-by-step can be found here (nixcraft)

On a related note, Richard Bejtlich has updated his draft of “Keeping FreeBSD Applications Up-To-Date“, a follow-up to my 2004 article of the same name that use FreeBSD 5.x for the examples.

The document contains the following sections

  • Introduction
  • FreeBSD Handbook
  • A Common Linux Experience
  • Simple Package Installation on FreeBSD
  • Checking for Vulnerable Packages with Portaudit
  • FreeBSD Package Repositories
  • Updating Packages by Deletion and Addition
  • Introducing the FreeBSD Ports Tree
  • Updatng the FreeBSD Ports Tree
  • Installing Portupgrade
  • Updating Packages Using Portupgrade
  • Removing Packages
  • Identifying and Removing Leaf Packages
  • Preparing to Build and Install Packages Using the Ports Tree
  • Building and Installing Packages Using the Ports Tree: A Simple Example
  • Building and Installing Packages Using the Ports Tree: A More Complicated Example
  • Install Packages Built on One System to Another System
  • Installing Screen Using a Remote FreeBSD Ports Tree
  • Reading /usr/ports/UPDATING
  • My Common Package Update Process
  • Conclusion

A PDF can be downloaded from the TaoSecurity website