pkg base upgrade equivalent of freebsd-update

If you watch the previously linked video Colin makes it clear this is the biggest release since 5.0 and that pkg-base is not production ready. So even if they do manage to get everything tidied up on the handbook you won't want to use pkg-base. It's just for testing right now. He said at some point in the 15 lifecycle you will run the pkgbasify script to migrate to pkg-base after it's no longer considered experimental. Then when it's time for 16.0 freebsd-update will work with pkg-base to perform the upgrade.
 
... Colin makes it clear ... that pkg-base is not production ready. ... He said at some point in the 15 lifecycle you will run the pkgbasify script to migrate to pkg-base after it's no longer considered experimental. ...
The -RELEASE versions are intended for production, not for testing, nor for experimental code. Why would one release something that is not intended to be used in production in that version? Shouldn't it have stayed in -STABLE or -CURRENT?
 
A switch from a non-packaged base to a packaged base is foreseen; however, this is, for all intents and purposes a one-way street, that is: there isn't a (supported) "downgrade" path from a packaged base back to a non-packaged base.
Not even to a source based install?
 
So, today, playing with a VM, more or less out of curiosity, I installed 14.3, Then I ran pkgbasify. After doing that, I wanted to see what would happen, so I ran freebsd-update to get to 15.0. Following the instructions here, https://www.freebsd.org/releases/15.0R/installation/, after running update-fetch I ran update install and rebooted. So far, no warnings. Then as those instructions said, I ran update install again, then being instructed by the system, I ran pkg upgrade -f. At this point the page indicates that you should run freebsd-update install again. This time, I go a message that I'd been expecting each time I ran install, that you can't run freeebsd-update if you are using pkgbase. The error referred me to pkgbase's wiki page, so I went there. https://wiki.freebsd.org/action/show/pkgbase?action=show&redirect=PkgBase

Now that said that if I were upgrading using pkgbase, I should change FreeBSD-base.conf to read
url = "pkg+https://pkg.freebsd.org/${ABI}/base_latest";
I did so. I then ran pkg upgrade. The machine was already showing as 15.0 release.

This was all done out of curiosity, and wondering how t0 upgrade another less important but still used machine that I used pkgbase on. Anyway, after running that pkg upgrade, it continued to show itself as 15.0-RELEASE and openbox, alacritty and mpv all worked fine. I know what joe81tx said, about it not being production ready, and sort of regret pkg basifying 2 less important machines. Yes, I did bectl on them to have a backup, but I've already made so many changes to both, it would be quicker to reinstall. My main workstation, though, is being done with freebsd-update when the time comes. I am guessing that when it gets a bit more official, I'll put something in FreeBSD-base.conf besides "latest", but as it is I have seen that I can update by using that. Not that I'd try it on an important machine.
 
Not even to a source based install?
Don't know. I have a hard time keeping up with all the latest changes; I don't recall this being being mentioned anywhere specifically. You could ask on the pkgbase or stable ML, however, I expect a lot of people are very much busy with documentation and such for the official release date, i.e. 2 December tomorrow.
 
The -RELEASE versions are intended for production, not for testing, nor for experimental code. Why would one release something that is not intended to be used in production in that version? Shouldn't it have stayed in -STABLE or -CURRENT?
Here's how they describe it in today's official announcement:
A major change in FreeBSD 15.0 is the introduction of a new method for installing and managing the base system using the pkg(8) package manager. During development, this method was commonly referred to as "pkgbase".
During installation, bsdinstall(8) prompts the user to choose between two installation methods:
  1. Distribution Sets (Traditional Method): This is the method used in previous FreeBSD releases. Systems installed this way continue to use the freebsd-update(8) utility for updates. Support for distribution sets is planned for removal in FreeBSD 16, but will continue (along with freebsd-update support) for the lifetime of the FreeBSD 15 stable branch.
  2. Packages (pkgbase / New Method): The base system is installed as a set of packages from the "FreeBSD-base" repository. Systems installed this way are managed entirely using the pkg(8) tool. This method is used by default for all VM images and images published in public clouds. In FreeBSD 15.0, pkgbase is offered as a technology preview, but it is expected to become the standard method for managing base system installations and upgrades in future releases.
So the production way is still available to you, they are simply offering the new way in parallel before distribution sets are deprecated. I imagine they did this so the code gets exposure to more diverse environments and bugs can be found while also giving you the chance to prepare for the change. You have to opt in to get pkgbase, either by selecting that option during installation or running pkgbasify on an existing system. It shows their confidence in pkgbase that VM and cloud images use it by default.
 
Not even to a source based install?
Don't know. I have a hard time keeping up with all the latest changes; I don't recall this being being mentioned anywhere specifically. You could ask on the pkgbase or stable ML, however, I expect a lot of people are very much busy with documentation and such for the official release date, i.e. 2 December tomorrow.
I suggest you follow/subscribe to relevant MLs. Re: changing from pkgbase to regularbase, Sat, 22 Nov 2025 01:35:41 UTC:
there is no supported method to "depkgbasify" a system.
You can start to read at the beginning: changing from pkgbase to regularbase, along the way there are some suggestions to follow.

Note that this is on the CURRENT ML.
 
I tried to upgrade a fairly unimportant machine today with pgkbase. Firstly I couldn't quite figure out the handbook's instructions. That's on me for being dumb. Handbook instructions are at https://docs.freebsd.org/en/books/handbook/cutting-edge/

Search for pkgbase on the page. Anyway, I wound up letting ChatGPT give me a script to do it, which worked. However, once I was running beta and had run pkg upgrade after install, none of the mozilla based browser, firefox, waterfox, and librewolf worked, alacritty no longer worked and other things here and there. At this point, I decided to just reinstall this machine when I have time. Trying to build alacritty and a few others from ports also failed. (Not asking for help, hence no error messages here). At any rate, I'm not sure how much of the various issues were just due to the upgrade and how many to pkgbase, and when I reinstall, I do plan to choose pkgbase. I figure by 16-RELEASE, it'll be pretty clear, with better documentation, though again, being unable to figure out what to put in FreeBSD-base.conf is on me, not the doc writers.
https://srobb.net/stupid.mp4 (4 second video)
 
Thanks for sharing the links, although this table is very confusing:

Table 2. Base system package Branches
BranchFrequencyURL
maintwice daily - 12:00 and 00:00 UTCpkg+https://pkg.freebsd.org/${ABI}/base_latest
mainweekly – Sunday at 12:00 UTCpkg+https://pkg.freebsd.org/${ABI}/base_weekly
stable/14twice daily – 12:00 and 00:00 UTCpkg+https://pkg.freebsd.org/${ABI}/base_latest
stable/14weekly – Sunday at 12:00 UTCpkg+https://pkg.freebsd.org/${ABI}/base_weekly
releng/14.3twice daily – 12:00 and 00:00 UTCpkg+https://pkg.freebsd.org/${ABI}/base_release_3
releng/15.0twice daily – 12:00 and 00:00 UTCpkg+https://pkg.freebsd.org/${ABI}/base_release_0
stable/15twice daily – 12:00 and 00:00 UTCpkg+https://pkg.freebsd.org/${ABI}/base_latest
stable/15weekly – Sunday at 12:00 UTCpkg+https://pkg.freebsd.org/${ABI}/base_weekly
 
I wound up letting ChatGPT give me a script to do it
I find that Grok and Claude provide better results--though it worked for you--but it's been a while since I've used ChatGPT. There is an article that says ChatGPT may be in trouble (iirc) and that Gemini has surpassed it in usability. Today I was looking at graphics cards and was surprised at Gemini's response which was most helpful. I haven't used Gemini lately because I found it's results to be far less than that.
 
freezr, yeah, that was part of what confused me. I tried things
Code:
url            = "pkg+https://pkg.freebsd.org/${ABI}/releng/15t";
and others before giving up.

Turns out that it's
Code:
url            = "pkg+https://pkg.freebsd.org/${ABI}/base_latest";

Actually, see below, that was wrong, that gave me STABLE. I *should* have used
Code:
pkg+https://pkg.freebsd.org/${ABI}/base_release_0


In part, that's because I was looking at the left column and missing the right (where it had /base_release). It also turns out that I installed STABLE not RELEASE. Heh that was ChatGPT's fault, they decided, and as I was already confused, I didn't check that.


I do have a second machine that is just used for storing backups and such. I might try on there.
I'm going to see what people post in the next few days. The second machine is headless, so i won't have trouble with alacritty and web browsers. Chrome did work, but I dislike it. I won't be getting to a fresh install for a few days. Of course, I'm not sure if issues I'm having are due to it being 15.0, upgrading with pkgbase, or mistakes I made with the update.
I might as well post what chatGPT gave me as a script. Perhaps it will help someone, but remember the caveat that after it was done some things didn't work. (Also after the reboot, I ran pkg upgrade. When I first rebooted, the amd-firmware (a Beelink SER5 with AMD gpu) had a version mismatch and X wouldn't start. I also see, while looking at it, that apparently some stuff got cut off. For example the shebang line, the #!/bin/sh and after that it has "et -e" I'm guessing that was set -e but not sure what that does.


echo "==> FreeBSD major upgrade to 15 using pkgbase"
echo " This script will:"
echo " • create FreeBSD-base.conf"
echo " • verify repositories"
echo " • run pkg-static upgrade with ABI=FreeBSD:15"
echo " • prompt before reboot"
echo

###############################################################################
# 1. Create /usr/local/etc/pkg/repos/FreeBSD-base.conf
###############################################################################

REPOFILE="/usr/local/etc/pkg/repos/FreeBSD-base.conf"

echo "==> Writing ${REPOFILE}"
mkdir -p /usr/local/etc/pkg/repos

cat <<'EOF' > "${REPOFILE}"
FreeBSD-base: {
url = "pkg+https://pkg.freebsd.org/${ABI}/base_latest";
mirror_type = "srv";
signature_type = "fingerprints";
fingerprints = "/usr/share/keys/pkg";
enabled = yes;
}
EOF

echo "✔ FreeBSD-base.conf created"

###############################################################################
# 2. Show current OS version
###############################################################################
echo
echo "==> Current system version:"
freebsd-version -ku
###############################################################################
# 3. Configure ABI for upgrade target
###############################################################################
ARCH=$(uname -m)
ABI="FreeBSD:15:${ARCH}"

echo
echo "==> Upgrade target ABI: ${ABI}"

###############################################################################
# 4. Dry-run repository check
###############################################################################
echo
echo "==> Fetching repo metadata (dry run)"
env ABI="${ABI}" pkg-static update -f

###############################################################################
# 5. Perform the actual base upgrade
###############################################################################
echo
echo "==> Ready to run pkgbase upgrade to FreeBSD 15"
echo "Press ENTER to proceed or Ctrl+C to cancel."
read _

env ABI="${ABI}" pkg-static upgrade -r FreeBSD-base

echo
echo "✔ Base system upgrade complete."

###############################################################################
# 6. Kernel + world reconciliation
###############################################################################
echo
echo "==> Running etcupdate (pre-merge)"
etcupdate resolve || true

###############################################################################
# 7. Final reboot
###############################################################################

reboot

Again this script was by chatGPT and as mentioned, I apparently pasted incorrectly at the beginning. Also, note that this script chooses STABLE, not RELEASE. (See freezr's post above. ChatGPT choose base_latest which is stable, rather than base_release_0).

Oh well, that's one reason I chose this box to try pkgrelease, I lose nothing important. Actually, I'm *gradually* getting the idea of how to do it.
 
scottro

I assume the first example is the correct one:

Code:
FreeBSD-base {
    url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}";
    mirror_type = "srv";
    signature_type = "fingerprints";
    fingerprints = "/usr/share/keys/pkg";
    enabled = yes;
}

Although sometimes I miss the fact the handbook is not enough stupid-proof... 😟
 
freezr I'm a bit confused now. (or more confused). You use the line
Code:
 url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}";
I thought, from that handbook page, that for upgrading to 15.0 one should use

Code:
pkg+https://pkg.freebsd.org/${ABI}/base_release_0
to get RELEASE.

But I'm guessing from your last two posts, that you used the VERSION_MINOR one and it provided a smooth upgrade to 15.0. Is that correct?

Thanks, and apologies for my stupidity. After all these years I should be getting this.
 
freezr I'm a bit confused now. (or more confused). You use the line
Code:
 url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}";
I thought, from that handbook page, that for upgrading to 15.0 one should use

Code:
pkg+https://pkg.freebsd.org/${ABI}/base_release_0
to get RELEASE.

But I'm guessing from your last two posts, that you used the VERSION_MINOR one and it provided a smooth upgrade to 15.0. Is that correct?

Thanks, and apologies for my stupidity. After all these years I should be getting this.

I am more confused than you, I assumed that usually the Handbook uses the right example as first, but in another thread I got a different recommendation:


Sometimes the Unix way doesn't go along with the average-Joe, very frustrating... 😩
 
Hrm, I'm still confused. (sorry to be a bit of a help vampire here). But then which is the correct url to use for the pkg+https, VERSION_MINOR or release_0. That is, which did you use on your smooth upgrade? (I really hope that the handbook soon makes this a bit clearer).
 
Hrm, I'm still confused. (sorry to be a bit of a help vampire here). But then which is the correct url to use for the pkg+https, VERSION_MINOR or release_0. That is, which did you use on your smooth upgrade? (I really hope that the handbook soon makes this a bit clearer).

We are in the same boat... 🆘
 
Hrm, I'm still confused. (sorry to be a bit of a help vampire here). But then which is the correct url to use for the pkg+https, VERSION_MINOR or release_0. That is, which did you use on your smooth upgrade? (I really hope that the handbook soon makes this a bit clearer).
For the release version use: url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}";
But be aware that the fingerprints must be: fingerprints = "/usr/share/keys/pkgbase-${VERSION_MAJOR}";

If you are using anything other than base_release (i.e. base_latest or base_weekley) the fingerprints are: fingerprints = "/usr/share/keys/pkg";

Found this the hard way, also be advised that listing content on a browser via https://pkg.freebsd.org/FreeBSD:15:amd64/base_release_0/ will fail with a "401" error, but any of the other pages will not. Direct content access will work though (i.e. https://pkg.freebsd.org/FreeBSD:15:amd64/base_release_0/pkgsite.pkg)
 
If you set ${VERSION_MINOR} then it will default to your currently installed minor version.

This means that to upgrade to 15.1 in the furniture, you will have to set it to base_release_1, or run the pkg command with “-o VERSION_MINOR=1” to override it.
 
This means that to upgrade to 15.1 in the furniture, you will have to set it to base_release_1, or run the pkg command with “-o VERSION_MINOR=1” to override it.
Unfortunately, this doesn't work. It works for ABI, but not for this var.
 
Hi everyone,

I'm trying to upgrade from freebsd-version #=> 15.0-RC4-p1 to 15.0-RELEASE on a pkgbase system. pkg update && pkg upgrade goes fine... However, the freebsd-version report is the same afterwards; ie it does not update to report 15.0-RELEASE or something to that effect, as I expected. My FreeBSD-base repo config file has the field
Code:
url : "pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/base_release_0"
which I *think* is correct. I'm unsure if this is even as issue or not. Does anyone here have further information or diagnostic guidance?

Thanks!
 
Hmmm, I just did this again right now. Worked fine. Using bastille.
I dont know about bastille. I just say it doesn't work with the pkg command. It's the same with env VERSION_MINOR=x pkg ....

By the way, what bastille does here? It's about the host system, not jail nor VM.

My point is that for the moment the pkgbase isn't mature. There was lately a breaking change and anothers are to be expected. There is no clear or simple command for the upgrade process. I think all of that will come.
 
Back
Top