13.1 Updating FreeBSD with freebsd-update
Warning
freebsd-update supports RELEASE, ALPHA, BETA, and RC versions on amd64 and arm64 (aarch64) architectures. CURRENT, STABLE, and PRERELEASE branches do not provide binary updates; using freebsd-update on these branches will result in an error and exit. These branches must be updated through source code compilation or PkgBase.
freebsd-update is the base system update tool for FreeBSD, supporting the download, verification, and installation of binary updates from the official FreeBSD update servers. It can also be used for upgrades and rollbacks across RELEASE versions.
Note
Only ALPHA, BETA, RC, and RELEASE versions on amd64 and arm64 (aarch64) architectures provide update sources. CURRENT, STABLE, and PRERELEASE do not have binary updates. For information on architecture support levels, see: FreeBSD Project. Supported Platforms[EB/OL]. [2026-03-26]. https://www.freebsd.org/platforms.
Note
For ZFS-related upgrades, see the ZFS chapter.
History
FreeBSD provides the utility freebsd-update for installing system updates, including upgrades to new major versions. freebsd-update was first included in the base system with FreeBSD 6.2-RELEASE for security updates and errata patches; the upgrade command was introduced in FreeBSD 6.3-RELEASE, and by 7.0-RELEASE it officially became the supported upgrade pathway.
References
FreeBSD Project. FreeBSD 6.2-RELEASE Release Notes[EB/OL]. [2026-04-16]. https://www.freebsd.org/releases/6.2R/relnotes.html. Release notes, "The freebsd-update(8) utility is now included in the FreeBSD base system."
FreeBSD Project. FreeBSD 7.0-RELEASE Announcement[EB/OL]. [2026-03-25]. https://www.freebsd.org/releases/7.0R/announce/. Official announcement confirming freebsd-update as the supported binary update tool for version upgrades, security fixes, and errata patches.
FreeBSD Project. freebsd-update -- fetch, install, and rollback FreeBSD updates[EB/OL]. [2026-04-17]. https://man.freebsd.org/cgi/man.cgi?query=freebsd-update&sektion=8. FreeBSD system update tool manual page.
Replacing the Default Text Editor with a Simpler One
Bash, Zsh, or sh
csh / tcsh
Check and Verify
View the current terminal default text editor:
View the current terminal visual text editor:
Routine Patch/Security Updates (X.Y-RELEASE → X.Y-RELEASE-pN)
X.Y-RELEASE → X.Y-RELEASE-pN)Warning
Whether performing a major version update, point release update, or routine update, this procedure should be executed first. It cannot be skipped, otherwise missing dependencies or an unbootable system may result.
FreeBSD Version Check
Performing the Update
Fetch updates
When information similar to the following appears:
The above paths are example output only; actual path names and quantities may differ slightly on your system. Please refer to the actual output.
This lists the files that have changed; after confirming, enter the letter q (quit) and press Enter.
Then install the updates:
For automated periodic update checks, use freebsd-update cron instead, which introduces a random delay of 1 to 3600 seconds before executing fetch.
Verifying the Updated FreeBSD Version
View the FreeBSD version after updating:
Note
Sometimes patches do not affect the kernel, so the kernel version will not change and cannot be reflected by
uname -r, but the userland version will change. Therefore, two version numbers may be displayed; the higher one should be taken as the current version.
Reboot the system:
Check the FreeBSD version:
Major Version Upgrades (X.Z-RELEASE-pN → A.0-RELEASE)
X.Z-RELEASE-pN → A.0-RELEASE)Note
The slow download speed of
freebsd-updateis not due to its update servers being located overseas (the same issue exists when using overseas servers). It may be related to its design;freebsd-updateis a pure Shell script consisting of thousands of lines of code. This is a long-standing issue.
freebsd-update upgrademay require up to 500 MB of space in its working directory (default /var/db/freebsd-update/), depending on the installed base system components. If the upgrade is interrupted, use the-Fflag to forcefetchto continue processing the unfinished upgrade.
Example: Upgrading from FreeBSD 14.3-RELEASE to 15.0-RELEASE
Check Version
Warning
Since changes between major versions may affect the
freebsd-updatetool itself, it is essential to:First update to the latest patch version of the current version (e.g.,
X.Y-RELEASE-pN), then update to the latest point release (e.g.,X.Z-RELEASE).Next, update to the latest point release and the latest patch version on that point release (e.g.,
X.Z-RELEASE-pN).Finally: Complete the major version upgrade (
X.Z-RELEASE-pN→A.0-RELEASE).See: libsys.so.7 not found when upgrading userland with legacy freebsd-update[EB/OL]. [2026-03-26]. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289769.
Update to 15.0-RELEASE
Upgrade the system to FreeBSD 15.0-RELEASE:
Run freebsd-update install to install the updates:
Kernel updates have been installed:
As can be seen, the currently installed kernel version and patch level is 15.0-RELEASE. However, the userland and the currently running system are still 14.3-RELEASE, so a reboot is required as instructed by freebsd-update:
Run freebsd-update install to install the userland updates:
Reinstall pkg itself to update the ABI to 15.0-RELEASE:
Update the ABI of third-party programs to 15.0-RELEASE:
The update of third-party programs is now complete.
Run freebsd-update again to complete the update process.
Verify the operating system version:
System update complete.
Troubleshooting and Outstanding Issues
Rolling Back Updates
Roll back the most recent system update:
pkg Cannot Find .so Files
.so FilesRun the following command in the terminal to force-initialize the pkg package manager:
FreeBSD Upgrade Error Resulting in Missing ntpd User
Run the following commands in the terminal:
Exercises
Read the source code of the
freebsd-updatescript, rewrite it using a high-level programming language, and verify whether it can significantly improve update speed.Create a freebsd-update mirror site.
The binary patch model of freebsd-update relies on precise tracking of base system component versions, while third-party software updates are managed by pkg. Analyze the advantages of this "base system and Ports separation" update strategy in ensuring ABI (Application Binary Interface) compatibility, and its limitations on rolling update requirements.
Last updated