It's highly recommended that to keep your productive servers up-to-date with the latest security patches installed. The yum command-line tool is used to install and update software packages under CentOS / RHEL / Fedora Linux.

However, I have tons of ports installed under FreeBSD servers. How do I upgrade all packages under FreeBSD?

After google around, I got two solutions:

Code:
FreeBSD# portsnap fetch
FreeBSD# portsnap update
FreeBSD# portaudit -F
FreeBSD# portupgrade -aR
The above four commands would do the work well.

You can also list the ports in a specified file, then use portmaster -Da to update it, like this:

Simply use the following command sequencely:

Code:
FreeBSD# portsnap fetch update
FreeBSD# pkg_version -l '<'
FreeBSD# vi /usr/ports/UPDATING
FreeBSD# portmaster -Da