I just went through quite a few FreeBSD 14 upgrades over the past month and just thought I'd note down the process. I also run quite a few jails on my FreeBSD hosts and also noted down what has been working for me. Seems like this information is very rarely documented across the internet so hopefully this helps someone out there!
Major Version Upgrade
Upgrade Host OS
Follow the guide below to upgrade a FreeBSD system to the latest OS version
First download the needed patching files
freebsd-update upgrade -r 14.0-RELEASE
Once completed install the new version with
freebsd-update install
Now reboot the system
reboot
Now run step 2. again
freebsd-update install
Now we need to reinstall pkg and all installed packages.
Upgrade
PKG
withpkg-static install -f pkg
Upgrade installed packages with
pkg upgrade -f
- Then we need to remove any old binaries, run
freebsd-update install
again - Finally run one last reboot and then run
uname -r
to confirm we are on the latest version
Upgrade Jail OS
Follow the guide below to upgrade a FreeBSD jail to the latest OS version
First download the needed patching files
freebsd-update upgrade -j "jail_name" -r 14.0-RELEASE
Once completed install the new version with
freebsd-update -j "jail_name" install
Now reboot the jail with
service jail restart "jail_name"
Now run
freebsd-update -j "jail_name" install
again.freebsd-update -j "jail_name" install
Now we need to reinstall pkg and all installed packages.
Upgrade
PKG
withjexec "jail_name" pkg-static install -f pkg
Upgrade installed packages with
jexec "jail_name" pkg upgrade -f
- Then we need to remove any old binaries, run
freebsd-update -j "jail_name" install
again. - Finally run one last service restart and then run
jexec "jail_name" uname -r
to confirm we are on the latest version
Final Notes
Again, this is very straight to the point but for some reason hard to find information that's laid out so clean.
Happy upgrading!