KnowledgebaseFreeBSD › Keeping FreeBSD up to date

Keeping FreeBSD up to date

FreeBSD splits updates in two, and it helps to keep them straight: the base system (kernel + core userland, versioned as one unit) is patched with freebsd-update, and packages (everything you installed) with pkg. Keep both current.

Base-system security patches

freebsd-update fetch
freebsd-update install

Run this regularly — it delivers security and errata patches within your current release. A patch that touches the kernel needs a reboot to take effect; freebsd-update will tell you when one is required.

Package updates

pkg update
pkg upgrade

Read the plan pkg prints before confirming — it lists exactly what changes.

Watch your release's end of life

Each FreeBSD release gets security support for a defined window. Check what you are on and plan ahead:

freebsd-version -kru      # kernel / running / userland versions
uname -r

When your release nears end of life, freebsd-update stops shipping patches for it — that is your cue to upgrade to a supported release.

Upgrading to a new release

Moving to a newer release (for example 14.1 → 14.2):

freebsd-update -r 14.2-RELEASE upgrade
freebsd-update install     # install the new kernel
shutdown -r now
freebsd-update install     # run again after reboot to finish userland
pkg upgrade -f             # rebuild packages against the new release

Take a snapshot first

Before a release upgrade, take a portal snapshot — it touches the kernel and core libraries, and a snapshot lets you revert instantly if anything misbehaves. Prefer a clean slate over an in-place upgrade? An OS reload from the portal re-provisions to a fresh release while keeping your IP and hostname. Both are in the console & recovery guide.

Related Articles

← All FreeBSD articles