Solved Error when switching to latest pkg repo

I am using 15.0-RELEASE.
I'm trying to switch to the latest package repo. I put FreeBSD: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest" } into usr/local/etc/pkg/repos/FreeBSD.conf, according to the manual. However, this results in an error when trying to update the local package repo:
Code:
...
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest/meta.conf --pkg+:// implies SRF mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest/meta.txz --pkg+:// implies SRF mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest/data.pkg --pkg+:// implies SRF mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest/data.tzst --pkg+:// implies SRF mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest/packagesite.pkg --pkg+:// implies SRF mirror type
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest/packagesite.tzst --pkg+:// implies SRF mirror type
Unable to update repository FreeBSD
Error updating repositories!
 
Remove the pkg+ from the URL, or set mirror_type: "srv". This should have been set in /etc/pkg/FreeBSD.conf, so you might want to check if it's still original.

Oh, forgot, this is 15.0. The repository name changed. It's FreeBSD-ports now. So it should be:
Code:
FreeBSD-ports: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest" }
You can check with pkg repos
 
It's maybe because the name of the main pkg repo has changed its default name: it's now FreeBSD-ports.
Try: FreeBSD-ports: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest" }

Edit: SirDice, you have edited your post.
 
I believed your initial posting didn't solve the problem.
You're right, it didn't. And I realised that right after the initial post. That's why I edited it. I edited it a couple of times actually.

It's a bit of an ADHD thing. I ram out a solution, post. Then realise its wrong, or not entirely correct, or not complete enough. Then edit it, post again. Then think I should probably add more, edit it again, post. This can unfortunately loop around a couple of times. Oh, and in between $DAYJOB starts nagging and requires my attention too.
 

Attachments

  • Screenshot 2025-12-05 214445.png
    Screenshot 2025-12-05 214445.png
    173.7 KB · Views: 76
I fixed this by doing the above. I realized the name change when checking pkg -vv.

As I'm still on the topic, you may have seen with pkg -vv (note that you can use pkg repos for that purpose), you have also a kmods repository (now named FreeBSD-ports-kmods). It's a bad idea to leave this one quarterly while the main repo is latest. So, I advise you to set your conf file like this:
Code:
FreeBSD-ports: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
FreeBSD-ports-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest_${VERSION_MINOR}"
}
 
Back
Top