≡ Menu

How To Upgrade FreeBSD 6.3 to 7.0 Stable Release

Q. FreeBSD 7.0-RELEASE is now available for the 64 and 32 bit computer architectures. How do I upgrade FreeBSD version 6.3-pX 64 bit to latest 7.0 64 bit system?

A. FreeBSD 6.3 allows upgrade of existing installation to FreeBSD 7.0-RELEASE. Since this is a major version upgrade, it is recommended that you backup existing data, database and config files. You also need to reinstall all ports.

Step # 1: Upgrade ports

Type the following command, enter:
# portupgrade -faP

WARNING! This procedure might not work for you as upgrading system is complex procedure. This may result into data loos. Please backup all important data and configuration files before executing any commands. All instructions are tested on FreeBSD 6.3pX 32/64 bit computers.

Step # 2: Download updated freebsd-update-upgrade tool

Type the following command:
# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz
# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz.asc
# gpg --verify freebsd-update-upgrade.tgz.asc freebsd-update-upgrade.tgz
# tar -xf freebsd-update-upgrade.tgz

Step # 3: Start upgrade procedure

Type the following command to install new kernel and reboot the system, enter:
# sh freebsd-update.sh -f freebsd-update.conf -r 7.0-RELEASE upgrade
# sh freebsd-update.sh -f freebsd-update.conf install
# reboot

Step # 4: Install updated userland tools

Install the new userland components, after which all ports should be recompiled to link to new libraries:
# sh freebsd-update.sh -f freebsd-update.conf install
# portupgrade -faP

Step # 5: Remove all old libraries

Finally, freebsd-update.sh needs to be run one last time to remove old system libraries, after which the system should be rebooted in order that the updated userland and ports will be running:
# sh freebsd-update.sh -f freebsd-update.conf install
# reboot

Step # 6: Verify FreeBSD 7.0

Run following command to verify that everything is running smoothly, enter:
# uname -a
# tail -f /var/log/messages
# tail -f /path/to/other/log/files
# egrep -i 'error|warning' /path/to/log/files
# sockstat -4 -l


Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 24 comments… add one }
  • Titus Barik March 13, 2008, 9:54 pm

    Can this upgrade be done over SSH, or will there be issues with getting back into the system after the reboot?

  • Pinoy Compuworld March 17, 2008, 12:51 am

    Will this work for 6.2 to 7.0?

  • nixCraft March 17, 2008, 7:04 am

    First, upgrade 6.2 to 6.3 and then switch to 7.0

  • Yasser March 17, 2008, 1:39 pm


    When i will upgrade to 7.0 lost my users and my files? or when upgrade is finished return my files and users or not ?

  • Andrew April 4, 2008, 10:09 am

    I was trying to do this upgrade from official freebsd website and it failed. When I’ve done it from your website it all worked thanks very much!:)

  • coolbeans April 9, 2008, 2:50 pm

    For testing purposes, I installed a minimal install of FreeBSD 6.3-RELEASE and wanted to upgrade to 7.0-RELEASE via SSH only. I installed 6.3 locally via CD-ROM. The only thing i did after was to enable SSH and changed the port to 300. I did not need to download a newer freebsd-update since 6.3-RELEASE has the correct version.

    I logged into this computer remotely via SSH and followed the steps mentioned in this article (obviously I didn’t have to upgrade any ports since I had 0 of them installed). Everything went smoothly, including using port 300 for SSH THE ENTIRE TIME even after the reboots. Don’t blame me though if it doesn’t work for you via SSH :P

    TIP: Currently MOST FreeBSD dedicated server hosting companies are only advertising 6.3. As of today, http://www.aplus.net/ will only install 6.3 and charge you $150 to upgrade to 7.0. THUS, I suggest if you’re getting a new dedicated server, have them install 6.3 with minimal install and no ports or changes. This way the upgrade to 7.0 will be smooth via SSH and will save you possibly $150 (:

  • Tim May 24, 2008, 8:04 pm


    I just upgraded from 6.2 to 7.0 via SSH. Worked like a charm.

  • kur June 28, 2008, 3:28 pm

    coolbeans – don’t mention aplus.net – this is a dirty word/company

  • Yaerek August 5, 2008, 7:23 am

    Howdy. I ran the scripts on a machine that is a remote machine. After running the last step and rebooting, I no longer can log in. The computer runs ssh and apache, kernel security level was set to ‘1’. I no longer can connect via ssh and apache (web site is no longer accessible). When trying to connect via ssh, I get Connection closed by
    Did this update overwrite my passwd file?

  • greg November 11, 2008, 5:35 am

    think I can do this from freebsd 6.1-release?

  • Yaerek November 11, 2008, 10:07 am

    The problem was, I had a bash shell configured in /etc/passwd. The upgrade program did not upgrade the bash but the library it links to (which is too bad, I thought freebsd was statically linked); so the bash was failing when launched. I had to change the /etc/passwd to use sh instead, then update the bash.

  • Micro-Shock December 14, 2008, 7:51 am

    /libexec/ld-elf.so.1: Shared object “libreadline.so.6” not found, required by “-bash”

    is there a work around for this …. I can no longer SSH to the server….

  • georgi kosev December 19, 2008, 4:48 pm

    upgraded from 6.2 do 7.0 via ssh without any problems

  • Oscar Cappa December 24, 2008, 2:30 am

    Dear Micro-Shock,
    to resolve the same problem i create a symbolic link to new version of library
    ln -s /lib/libreadline.so.7 /lib/libreadline.so.6

  • Shoaibi January 13, 2009, 7:33 am

    Can i upgrade using this method from 6.1 to 7.1 ?

  • Darko February 4, 2009, 11:55 pm

    Well I just did 6.2 to 7.1 without a glitch and all over ssh on a production server with 200+ packages installed on it.

    It took a lot of courage/to do it this way. If it went wrong I would had to travel 200 miles to access it from the console.

    But I am happy to report the upgrade procedure worked well (had to clear up some dependencies manually but that is minor).

  • simc February 10, 2009, 8:51 am

    I’ve upgrade a 6.3 to 7.1 whithout difficulties thanks.

  • Gambler May 15, 2009, 6:16 pm

    If you get certain library errors, installing /usr/ports/misc/compat6x might help.

  • bryn1u June 13, 2009, 12:24 am

    I have a problem. When i used [code]Step # 3: Start upgrade procedure

    Type the following command to install new kernel and reboot the system, enter:
    # sh freebsd-update.sh -f freebsd-update.conf -r 7.0-RELEASE upgrade
    # sh freebsd-update.sh -f freebsd-update.conf install
    # reboot
    [/code] after reboot i cant connect with server by ssh. I had to connect monitor to my home server, when i wrote in console example: ssh -p 31337 bryn1u@localhost worked fine, but when i wrote ssh -p 31337 bryn1u@ i got something like [code]
    ssh: connect to host port 31337: Network i unreachable[/code]So whats wrong, why i cant connect with my own server. Before upgrade everything was fine. Someone can help me ?

  • dzibi April 16, 2010, 4:59 pm

    I did it for 6.2->7.0->7.3 and it is not working fine. At firs view at the system after upgrading, everthing looks fine. Problem is while compiling apache, mysql or something like that because of PTHREADS. After working with symlinks and installin/deinstalling compat6x, compat5x finaly compiling mysql and apache was successful. Than I started snmpd and there is a problem like this:

    kvm_read(*, 1, 0x7fffffffe920, 40) = -1: kvm_read: Bad address
    auto_nlist failed on cp_time at location 1

    I followed the problem and found this:

    Your kernel and userland are not synchronized (i.e., you built a new kernel but did not do an installworld, or vice versa), and thus the symbol table is different from what the user application thinks it is. If this is the case, simply complete the upgrade process (see /usr/src/UPDATING for the correct sequence).

    How could I repair it?

    • dzibi April 23, 2010, 12:53 pm

      Hi again,
      everything is fine now, I just installed snmpd when I’ve got 7.0. After upgrading I just forgot to install snmpd again.
      One problem just was with pthread library and modules but it just needs creating some symlinks.

  • David Radovanovic April 22, 2010, 8:40 pm

    Thanks for sharing! I upgraded from 6.3 and it went relatively flawless though I had to fix several stale dependencies. Thanks again.

  • linko22 June 22, 2010, 12:38 pm

    For the first, before any update change user-shell to default, e.g. /bin/sh

  • Wim December 15, 2012, 10:29 am

    Thank you for the very helpful article. Life saver!

    I used to to upgrade from 6.3 to 8.3 and it went without a hitch….although it took me three days to plow through the portupgrades. Serves me right for not running it more frequently.

    Now I can finally mount an ext3 USB drive with 128-byte inodes. Which is what I started out doing initially.

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , ,