Home FreeBSD FreeBSD: Upgrade FreeBSD 8.1 to FreeBSD 9.1 – Part II

FreeBSD: Upgrade FreeBSD 8.1 to FreeBSD 9.1 – Part II

by Kliment Andreev
2.5k views

In the part 1, we discussed how to upgrade the OS from 8.1 to 9.1. But most of the applications that were installed are outdated at this point. In order to upgrade the port tree, use the following commands:

portsnap fetch extract
portsnap fetch update

These commands will download the current port tree, but won’t actually install the applications. At this point it is very important to check if you want to actually upgrade your applications. Some of them might now work, but if they work fine, you might leave them as is. Mind that this might cause some compatibility issues. So, in order to upgrade the installed application, let’s look what’s installed. The easiest way is to run:

portmaster -L --index-only| egrep '(ew|ort) version|total install'

The output will look similar to this.


If you want to upgrade an installed application, do:

portmaster openvpn

But, don’t do that without reading /usr/ports/UPDATING file first. As a matter of fact, this is a file that you have to read it before any port updates. For example, you can’t run:

portmaster pkg-config

According to the UPDATING file:

20120726:
AFFECTS: users of devel/pkg-config
AUTHOR: [email protected]

devel/pkg-config has been replaced by devel/pkgconf

# portmaster -o devel/pkgconf devel/pkg-config
or
# portupgrade -fo devel/pkgconf pkg-config-\*

The same is valid for jpeg. Mind that some of the ports that you have installed are very important and used by many applications. So, spend some time and read the UPDATING file first. Pay special attention on all PHP installs.

What I do is to open three terminal sessions. The first one is where I execute:

portmaster -L --index-only| egrep '(ew|ort) version|total install'

The second terminal has /usr/ports/UPDATING file opened, so I can search for the ports remaining that needs to be upgraded, and the third terminal window is where I execute the portmaster command.

If you receive an error “pkg_version: corrupted record for…”, do:

portmaster --check-depends

You’ll be prompted to remove some of the obsolete ports, most likely some php* ports.

Links:
http://www.wonkity.com/~wblock/docs/html/portupgrade.html
https://www.freebsd.org/doc/handbook/ports-using.html

Related Articles

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More