Updating FreeBSD from 8.2-R to 9.0-RELEASE

Start by using the freebsd-update utility:
freebsd-update -r 9.0-RELEASE upgrade
It should work great from release to release.

Use portmaster to do a complete reinstallation of all your ports:

  • portmaster –list-origins > ~/installed-port-list
  • Update your ports tree
  • portmaster -ty –clean-distfiles
  • portmaster –check-port-dbdir
  • portmaster -Faf
  • pkg_delete -a
  • rm -rf /usr/local/lib/compat/pkg
  • Back up any files in /usr/local you wish to save, such as configuration files in /usr/local/etc
  • Manually check /usr/local and /var/db/pkg to make sure that they are really empty
  • Re-install portmaster
  • portmaster `cat ~/installed-port-list`

You probably want to use the -D option for the installation and then run –clean-distfiles [-y] again when you are done. You might also want to consider using the –force-config option when installing the new ports.
Alternatively you could use portmaster -a -f -D to do an “in place” update of your ports. If that process is interrupted for any reason you can use portmaster -a -f -D -R to avoid rebuilding ports already rebuilt on previous runs. However the first method (delete everything and reinstall) is preferred.

Leave a Reply

Your email address will not be published. Required fields are marked *