First Time Upgrading FreeBSD

Last updated: Apr 17, 2008

If you remember from my post on my Initial Impression of FreeBSD 7.0 I am fairly new at using FreeBSD. After my recent Wordpress SQL Injection Attack I went around updating everything that I could get my hands on. A FreeBSD server happened to be one of those things that need updating.

Fortunately FreeBSD has a great utility to keep everything updated. It’s called portupgrade. If you don’t already have it installed you can install it through ports.

# /usr/ports/ports-mgmt/portupgrade

Now before you start the portupgrade process lets find out what ports actually need updating. This way if we find any programs that we would rather have the old version we exclude it. Another reason we want to know which programs need updating is to find applications that may require special updating instructions.

To find the programs that are out of date run:

# pkg_version -v

This is also a good time to watch the list and find packages that you may no longer need.

To update all ports use:

# portupgrade -a

If you want portupgrade to ask you each time before updating you can use interactive mode.

# portupgrade -ai

Maybe you ran a portaudit and only one of the programs needs a security upgrade and you just want to upgrade that one for now.

# portupgrade -R firefox

That is about all there is to updating your entire FreeBSD system. I sure wish I could update every program in Windows with one simple command.

Need to print shipping labels on your site?

Checkout my product RocketShipIt for simple easy-to-use developer tools for UPS™ FedEx™ USPS™ and more.

Get notified on new posts or other things I'm working on

Share: