How to upgrade a #FreeBSD  box, e.g. from 9.0 to 9.2:
As root (or run every command via sudo):

$ make -C /usr/ports/ports-mgmt/portupgrade install clean
$ freebsd-update -r 9.2-RELEASE upgrade
It'll tell which base packages will be upgraded 
$ freebsd-update install
You'll be asked to merge some config files
$ shutdown -r now
$ freebsd-update install
$ portupgrade -f ruby
$ portupgrade -f 'ruby*-bdb*'
$ rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db
$ pwd_mkdb -p /etc/master.passwd
$ portupgrade -af
You'll have some coffee now, but don't go away as some ports may show a dialog with some options to choose from
$ freebsd-update install

Finally, either reboot the machine or (re-)start enabled services in /usr/local/etc/rc.d/ manually.
Shared publicly