A rough guide, for alpha testing on AMD64:
- tested with FreeBSD 15.0-ALPHA2 and ALPHA3
- things might be less rough with ALPHA4, with or without the next release of ports-mgmt/pkg.
Not intended to be comprehensive.
It's conventional to upgrade the userland part of base before upgrading non-base packages.
The numbered steps below break from convention. The disorderly approach is a workaround to pkg issue #2414. Proceed with caution.
Also, please note:
- FreeBSD bug 289097 affecting
/root/.cshrcand/root/.profile– fixed (cherry-pick, 2025-10-01) - pkg solver is looking at too many packages · Issue #2520 · freebsd/pkg – this might be an underlying cause of issue 2414 above
- BACKUP_LIBRARIES improvements · Issue #2501 · freebsd/pkg
- pkg: sqlite error while executing BEGIN IMMEDIATE TRANSACTION in file pkgdb.c:1206: cannot start a transaction within a transaction · Issue #2522 · freebsd/pkg – reportedly fixed in pkg 2.4.0
- libpkg: Support system triggers · freebsd/pkg@7831a19 (2025-09-18) – version 2.3.1 of pkg does not include this base-related enhancement
- if you had a minimal installation of the OS prior to upgrade, you might want to install FreeBSD-bsdconfig, FreeBSD-csh, and FreeBSD-ee – or the meta package for their set(s) – after the upgrade
- Desktop environments: FreeBSD Project-provided packages in the ports collection
- last but not least, freebsd-update and pkgbase – discussion, an outcome of which should be a tool that frees us from the complexity below.
su -pkg install devel/uclcmd/bin/tcshpkg prime-origins | sort -u > /var/tmp/pkg-prime-origins.txt/usr/local/etc/periodic/daily/411.pkg-backuppkg upgradeuclcmd set --file /usr/local/etc/pkg/repos/FreeBSD-base.conf FreeBSD-base.url 'pkg+https://pkg.freebsd.org/${ABI}/base_latest'pkg -v- note the version
pkg lock -y pkgtouch /usr/local/etc/pkg/repos/FreeBSD.confcat /usr/local/etc/pkg/repos/FreeBSD.conf- if the file is empty, run an echo command
echo "FreeBSD {url = example} FreeBSD-kmods {url = example}" > /usr/local/etc/pkg/repos/FreeBSD.confuclcmd set --file /usr/local/etc/pkg/repos/FreeBSD.conf FreeBSD.url 'pkg+https://pkg.freebsd.org/${ABI}/latest'uclcmd set --file /usr/local/etc/pkg/repos/FreeBSD.conf FreeBSD-kmods.url 'pkg+https://pkg.freebsd.org/${ABI}/kmods_latest'env ABI=FreeBSD:15:amd64 pkg update -f- ignore all on-screen suggestions to run
pkg bootstrap -f sysctl vm.pageout_oom_seq=120env ABI=FreeBSD:15:amd64 pkg upgrade --fetch-only --yes- conflicts may be observed as a result of the fetch, another iteration (run of the command) may be required
bectl create fourteen-fifteen-readyenv ABI=FreeBSD:15:amd64 pkg upgrade -U FreeBSD-kernel-generichistory -Sexitshutdown -r now- login as root at ttyv1
/bin/tcshservice cron stop/usr/local/etc/periodic/daily/411.pkg-backupsysctl vm.pageout_oom_seq=120env ABI=FreeBSD:15:amd64 pkg-static upgrade -fU --repository FreeBSDenv ABI=FreeBSD:15:amd64 pkg-static upgrade- if the upgrades were successful,
history -Sthenexitandshutdown -r now ee /usr/local/etc/pkg/repos/FreeBSD.conf- modernise the repository names – FreeBSD-ports and FreeBSD-ports-kmods
pkg install -nU -r FreeBSD-base --glob 'FreeBSD-set-*'- decide whether you want any base meta package (for a FreeBSD Project-defined set of packages)
pkg install -nU -r FreeBSD-base --glob 'FreeBSD-*'- decide whether you want any additional base package
- when you're certain that bootstrap will not result in a downgrade,
pkg-static unlock -y pkg && pkg bootstrap -fy
Dry runs of a major upgrade from RELEASE to CURRENT, preceded by a fetch of packages:
env ABI=FreeBSD:16:amd64 pkg upgrade -Fqy
--repository FreeBSD(FreeBSD-ports)--repository FreeBSD-baseA non-dry run of the third option does fetch additional packages.
The fetch-after-fetch effect was noted a few days ago:
Now, it's nice that I can avoid hundreds of unwanted removals by not specifying a repository.Previously, with a major upgrade to 15.0-ALPHA3, it was necessary to specify the FreeBSD (ports) repository for a disorderly upgrade (port packages before userland).