I like to use MacPorts for installing certain libraries and programs. When running an update old versions are still kept on your disk. I never did care for those old versions, so you can simply let MacPorts remove them while updating:
$ sudo port -u upgrade outdated
This is taken from another blog post.