Updating a FreeBSD system

I updated this webserver from 9.0 to 9.2 running these commands 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 you 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.

Update 2016-05-08: Recently, I have been using a simpler and safer way to update FreeBSD boxes:

$ make -C /usr/port/ports-mgmt/portmaster install clean
$ portsnap fetch update
(Make sure you use a shell from the base operating system)
$ chsh -s /bin/csh root
(Make sure /etc/nsswitch.conf refers to shared libraries from the base os only, e.g. do not use libnss_winbind.so from the ports during the update)
$ vi /etc/nsswitch.conf
$ freebsd-update -r 10.3-RELEASE upgrade
(It'll tell you which base packages will be upgraded, and you'll be asked to merge some config files)
$ freebsd-update install
$ shutdown -r now
$ freebsd-update install
$ portmaster -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
(Optionally, you may want to free some diskspace)
$ rm -rv /boot/*.old /usr/ports/distfiles/*