it is recommended that to keep FreeBSD
systems up to date with the latest application security patches
installed via ports collection. The yum command line tool
is used to install and update software packages under CentOS / RHEL /
Fedora Linux. However, I’ve tons of apps installed under FreeBSD. How
do I upgrade all packages under FreeBSD?
Step # 1: Update FreeBSD Ports Tree
Type the following command. Only run this command to initialize your portsnap-maintained ports tree for the first time:# portsnap fetch extract
Install portmaster to manage your ports without external databases or languages:
# cd /usr/ports/ports-mgmt/portmaster
# make install clean
Step # 2: List All Outdated Packages FreeBSD Ports Tree
Type the following command:# pkg_version -l '<'
Sample Output:
apache < libiconv < libxml2 < mod_security < mysql-client < p5-Storable < portmaster < postfix < spawn-fcgi <
Step # 3: Read /usr/ports/UPDATING File
Open /usr/ports/UPDATING file using a text editor and read information regarding your applications. This file describes various issues and additional steps users may encounter and need to perform when updating a port, including such things as file format changes, changes in locations of configuration files, or other such incompatibilities with previous versions.# vi /usr/ports/UPDATING
Step # 4: Upgrade All Packages / Ports / Apps
Type the following command:# portmaster -Da
Sample Outputs:
===>>> Starting check of installed ports for available updates ===>>> Checking ports for recursive 'make config' ===>>> The devel/libltdl15 port moved to devel/libltdl22 ===>>> Reason: Update to libltdl22 ===>>> Launching child to update libltdl-1.5.26 ===>>> The devel/libltdl15 port moved to devel/libltdl22 ===>>> Reason: Update to libltdl22 ...... ......output terminated... ....
(source: http://www.cyberciti.biz)