Switching pkg from quarterly to latest

1 view
Skip to first unread message

Bobb Shires

unread,
May 24, 2026, 10:27:15 PM (4 days ago) May 24
to freebsd-...@freebsd.org
I'm on 14.4-RELEASE-p5 and following instructions in section 4.4.2 of the handbook "To switch pkg(8) from Quarterly to Latest run the following commands:"
https://docs.freebsd.org/en/books/handbook/ports/#quarterly-latest-branch

The two commands listed appeared to complete normally, however the command
# pkg update -f

Gives me this... Help please? What does this mean?
Thanks!

=== root@monster ~ 2 -> # pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100% 179 B 0.2 kB/s 00:01
Fetching data: 100% 10 MiB 11.0 MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 37078 packages processed.
Updating FreeBSD-kmods repository catalogue...
Fetching meta.conf: 100% 179 B 0.2 kB/s 00:01
Fetching data: 100% 36 KiB 37.0 kB/s 00:01
Processing entries: 100%
FreeBSD-kmods repository update completed. 245 packages processed.
Updating FreeBSD-ports repository catalogue...
pkg: Repository FreeBSD-ports has a wrong packagesite, need to re-create database
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/meta.conf -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/meta.txz -- pkg+:// implies SRV mirror type
repository FreeBSD-ports has no meta file, using default settings
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/data.pkg -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/data.tzst -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/packagesite.pkg -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/packagesite.tzst -- pkg+:// implies SRV mirror type
Unable to update repository FreeBSD-ports
Error updating repositories!

Steve Rikli

unread,
May 24, 2026, 11:23:26 PM (4 days ago) May 24
to Bobb Shires, freebsd-...@freebsd.org
For starters, let's do the simple thing and check what your new
pkg config file actually ended up looking like.

Fwiw I've usually had something like this for FreeBSD 14 and earlier:

FreeBSD: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}

For FreeBSD 15 and newer, where there is new pkgbase as well as pkg,
I have the same config except the repo name for pkg is "FreeBSD-ports".

I'd expect the 2nd setup to work on 14 as well, but I suspect the
additional lines after "url:" might be missing from your new file, and
that may be giving trouble.

Bobb Shires

unread,
May 24, 2026, 11:47:10 PM (4 days ago) May 24
to Steve Rikli, freebsd-...@freebsd.org
That was it, thanks Steve!
Contents of my /usr/local/etc/pkg/repos/FreeBSD.conf was the single line
FreeBSD-ports: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest" }
I've replaced it with what you provided and all appears well - repositories updated without complaint.

(that part of the handbook needs work? Or did I skip a crucial step elsewhere?)

Steve Rikli

unread,
May 25, 2026, 12:25:04 AM (4 days ago) May 25
to Bobb Shires, freebsd-...@freebsd.org
I suspect that Handbook command needs adjusting.

E.g. I typically use /etc/pkg/FreeBSD.conf as a template to create a
new /usr/local/etc/pkg/repos/FreeBSD.conf file, either modified manually
if I'm doing something custom, or more typically created with 'sed' if
I'm just switching repos like this.

Dag-Erling Smørgrav

unread,
May 25, 2026, 3:50:26 AM (4 days ago) May 25
to Bobb Shires, Steve Rikli, freebsd-...@freebsd.org, zi...@freebsd.org
"Bobb Shires" <bo...@fastmail.com> writes:
> That was it, thanks Steve!
> Contents of my /usr/local/etc/pkg/repos/FreeBSD.conf was the single line
> FreeBSD-ports: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest" }

This would have worked on FreeBSD 15. Whoever updated that section of
the handbook forgot that FreeBSD 14 still exists (and FreeBSD 13 still
existed until a few weeks ago).

I also strongly disagree with the idea of just giving a command for the
user to run without explaining what it does.

The pkg utility reads repository definitions from /etc/pkg first, then
/usr/local/etc/pkg/repos. If it encounters a repository definition with
the same name as an earlier one, the two definitions are merged:
variables present in the new definition override those present in the
old one, but variables found only in the old definition are preserved.

What the handbook tells you to do is provide a partial definition for a
package repository named “FreeBSD-ports”. This works if you already
have one, but if you don't, you end up with a new repository with
incomplete information.

> I've replaced it with what you provided and all appears well -
> repositories updated without complaint.

All is not well. You now have both quarterly and latest enabled
simultaneously under different names. What you actually need to do is
override the URL of the repository definition you already have:

FreeBSD: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest" }

The repository was renamed from “FreeBSD” to “FreeBSD-ports” in FreeBSD
15 to better distinguish it from the pkgbase repository, which is named
“FreeBSD-base”.

DES
--
Dag-Erling Smørgrav - d...@FreeBSD.org

Reply all
Reply to author
Forward
0 new messages