Upgrading to a new release with pkgbase

Hello,

I recently installed two new system with pkgbase running 15.0-RELEASE.

Updating to get the latest patches with "pkg" has worked fine.

With 15.1-RELEASE around the corner, I have started to look into what the upgrade process will look like, but mostly I am somewhat confused.

Can anybody shed some light on what the procedure will look like?

Will there be a thorough explanation published along with the actual release on how to safely update to the new release using pkg?

Side note: I really like how OpenBSD does it where you basically run "sysupgrade" which does all the heavy lifting and you only have to do a few further bits manually depending on your setup.

Best regards,
Kristian
 
I quote myself:
abi=FreeBSD:15:amd64 # Case arch=amd64 and major version = 15.
osversion=1501000 # Want to upgrade to 15.1
# pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade


You can add -r FreeBSD-base if you don't want to upgrade others packages than base & kernel.
 
With 15.1-RELEASE around the corner, I have started to look into what the upgrade process will look like, but mostly I am somewhat confused.

Can anybody shed some light on what the procedure will look like?
Notice that your /etc/pkg/FreeBSD.conf contains a line like so:
url: "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}"
VERSION_MINOR is derived from the kernel so once you update the kernel, pkg will do the right thing. [At least that is my understanding!] But proper instructions will be in the release notes for 15.1. "pkg -vv" shows you the result of processing pkg config files.
 
I followed the procedure from my workstation But from a dedicated BE It must be said that I have automatic snapshots to two disks of the same machine And weekly manual backup to USB 3.0 enclosure 0 risk
 
What seems hard about it? Granted, everything is easy, or most things anyway, once you know how to do them, and this is apparently new to you, but this is just a matter of typing some commands. You can copy and paste them directly from the links that @fjdir and I gave. It might seem a bit more complex if you're used to freebsd-update, but it's pretty straightforward. Anyway, 15.1 is coming out soon (the RELEASE version) and so there's no harm in waiting for a bit. But if you tell us what you find confusing or intimidating, we can probably give some assistance.
 
I am the dumbest here... But I read the instructions and it looks even more complicated than before... Why? 🤷‍♂

If you read this beforehand, do you understand the meaning?
Follow these steps:
Make new BE and boot into
or UFS system backup or make img (clonzilla)

First, update pkg(8) itself to ensure you have the latest version:

# pkg upgrade -yr FreeBSD-ports pkg

Second, upgrade the base system. Create a temporary repository
configuration that points exactly to the 15.1-RC2 package repository:

# mkdir /tmp/upgrade-15.1
# echo 'FreeBSD-base: {
url: "pkg+https://pkg.freebsd.org/${ABI}/base_release_1_rc2"
}' > /tmp/upgrade-15.1/upgrade.conf

Or
# ee /tmp/upgrade-15.1/upgrade.conf

and paste into

FreeBSD-base: {
url: "pkg+https://pkg.freebsd.org/${ABI}/base_release_1_rc2"

save file /tmp/upgrade-15.1/upgrade.conf

Next

# pkg -o REPOS_DIR=/etc/pkg,/usr/local/etc/pkg/repos,/tmp/upgrade-15.1 \
-o IGNORE_OSVERSION=yes upgrade -r FreeBSD-base


# pkg -o REPOS_DIR=/etc/pkg,/usr/local/etc/pkg/repos,/tmp/upgrade-15.1 \
upgrade -r FreeBSD-ports-kmods
if system amd64
amd64:
# cp /boot/loader.efi /boot/efi/efi/boot/BOOTX64.EFI

If your system uses a no standard loader path (e.g.,
`/efi/freebsd/loader.efi`),
find the correct destination with `efibootmgr -v` and look for the
`File(...)` entry of the active boot option.


# find /etc /usr/local/etc -name '*.pkgnew' -ls

if exist compare original and make changes

After verifying the configuration files, remove the temporary repository
configuration:

# rm -r /tmp/upgrade-15.1

and
reboot to load the new kernel and userland:

# shutdown -r now
 
Lol, it's even more complicated than he thought and far more complicated than needed.

There are easiest ways to upgrade without risk with pkgbase. But, it's better to wait for official upgrade instructions.

I think that soon or late, there will be a tool in the base for upgrade. And in the meantime, a tool may appear in ports.
 
I think, without pretending I can read fjdlr's mind he's trying to make it clearer what is happening. Last time, 14-15 was a little tricky because some keys were wrong so one had to edit the pkg keys url, but I think that was just because at the time, pkgbase was a pretty new thing. I suspect it will be pretty straightforward and easy and even those who lack confidence will be able to get it done. Of course, it's easy to make predictions. :)
 
I did the mistake to believe that with PKGBASE things were done stupid-proof, like...

- Make a snapshot
- Modify the repo
- Update
- Upgrade
- Restart

My fault.
 
Hi
Today, my 15.1.RC2 update was done automatically (no need to modify any repository reference files).
The system is upgraded from 15.1.rc2.20260530062026 to 15.1.rc3.20260606060724
After reboot
#> pkg which /usr/bin/uname
/usr/bin/uname was installed by package FreeBSD-runtime-15.1.rc3.20260606060724

11:55 #> cat /usr/local/etc/pkg/repos/ports-latest.conf
FreeBSD-ports: {
url: "http://pkg0.sjb.freebsd.org/${ABI}/latest",
mirror_type: "NONE",
enabled: yes
}

FreeBSD-ports-kmods: {
url: "http://pkg0.sjb.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR}",
mirror_type: "NONE",
enabled: no
}

FreeBSD-base: {
enabled: yes
}

(I'm not using a mirror at the moment, because for major upgrades from my location the server responses are unusable.)


This procedure is perfectly valid and safe.
https://lists.freebsd.org/archives/freebsd-stable/2026-May/004119.html
 
Back
Top