FreeBSD 14.4 - pkg is slow to update database

So I have just installed FreeBSD 14.4-release-p7 (ok, I installed 14.4-release and used freebsd-update to get to -p7) on a new partition on the SSD of my workstation.
And suddenly, pkg is slow to update it's database (the "processing entries" part), fetching takes a little less than ten seconds, but look at this
Code:
root@kg-core2:~ # time pkg upgrade -n
Updating FreeBSD repository catalogue...
Fetching data: 100%   540 MiB  62.9 MB/s    00:09    
Processing entries:  76%
Unable to update repository FreeBSD
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Error updating repositories!
Checking for upgrades (4 candidates): 100%
Processing candidates (4 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
      224.94 real       199.95 user         6.56 sys
that's around 3 minutes!
And it complains that it can't update the FreeBSD repository. What gives?
It wasn't that slow when I installed, it has just become slow now.
Recap:
Code:
root@kg-core2:~ # freebsd-version -ku
14.4-RELEASE-p7
14.4-RELEASE-p7
root@kg-core2:~ # uname -a
FreeBSD kg-core2.kg4.no 14.4-RELEASE-p7 FreeBSD 14.4-RELEASE-p7 #0 -dirty: Tue Jun 30 08:53:56 UTC 2026     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
root@kg-core2:~ # pkg info pkg\*
pkg-2.7.5
pkgconf-2.4.3_1,1
date and time is synced
Code:
root@kg-core2:~ # ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*kg-omni1.kg4.no 192.36.143.130   2 u  114  128  377    0.064   +2.125   0.108
and I did 'certctl rehash' (it shouldn't matter, it fetches files all right)
the repo directories
Code:
root@kg-core2:~ # ls -l /var/db/pkg /var/db/pkg/repos
/var/db/pkg:
total 106788
-rw-r--r--  1 root wheel 109289472 Jul 21 23:19 local.sqlite
drwxr-xr-x  4 root wheel       512 Jul 21 19:30 repos

/var/db/pkg/repos:
total 8
drwxr-xr-x  2 root wheel 512 Jul 21 23:37 FreeBSD
drwxr-xr-x  2 root wheel 512 Jul 21 19:30 FreeBSD-kmods
this one is new for me.
 
I have also noticed a significant slowdown for FreeBSD 14.4-release-p7 since a few days ago as I have been spinning up a number of fresh vm installs for testing.
What was 1-2 minutes is now 10+ and pkg search is now just stalling.


Updating FreeBSD repository catalogue...
Fetching data: 100% 540 MiB 9.0 MB/s 01:03
snail pace from here on ...

Processing entries: 76%
Unable to update repository FreeBSD
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Error updating repositories!

Downloading a pkg is fine, so I'm using pkg install -U to avoid the issue, but may have out of date packages I need to fix later.
 
Having same problem. Multiple servers and networks all failing to complete pkg update

Updating FreeBSD repository catalogue...
Fetching data: 100% 540 MiB 3.6 MB/s 02:38
Processing entries: 76%
Unable to update repository FreeBSD
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Error updating repositories!
 
I am seeing this as well, maybe even more so. Just ran pkg update, and the download took much more time, as did the processing. It seems now the download was 540MiB, and the processing did not finish successfully:
Code:
Updating FreeBSD repository catalogue...
Fetching data: 100%   540 MiB   2.4 MB/s    03:52    
Processing entries:  76%
Unable to update repository FreeBSD
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Error updating repositories!

On a different host, same command but different error (oops, ran out of space on /tmp):
Code:
Updating FreeBSD repository catalogue...
Fetching data: 100%   540 MiB   5.4 MB/s    01:44    

/tmp: write failed, filesystem is full
pkg: Error extracting the archive: 'Write error'
pkg: No signature found
Fetching packagesite: 100%   540 MiB   3.9 MB/s    02:24    

/tmp: write failed, filesystem is full
pkg: Error extracting the archive: 'Write error'
pkg: No signature found
Unable to update repository FreeBSD
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Error updating repositories!

Both systems are 14.4-RELEASE-p7

What's up with the repository?
 
I got almost exactly the same as both posters first screenshots - 540 MiB, processing stopped at 76% (FreeBSD 14.4 p7) - (to state the obvious) something's not right at the moment:

Code:
# pkg upgrade
Updating FreeBSD repository catalogue...
Fetching data: 100%   540 MiB   6.3 MB/s    01:30  
Processing entries:  76%
Unable to update repository FreeBSD
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Error updating repositories!
Checking for upgrades (14 candidates): 100%
Processing candidates (14 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
 
I am also experiencing this issue. I am unable to download any packages or update. I am on FreeBSD 15, latest, amd64.

I found this Reddit thread: https://old.reddit.com/r/freebsd/comments/1v2z68d/is_there_a_way_to_check_the_status_of_the_freebsd/ discussing it. I am hesitant to flip back from latest to quarterly but this is my output from trying what user grahamperrin posted:

Code:
root@desktop:~ # pkg repos -el | sort -f ; sleep 5 ; pkg repos -e | grep -B 1 url
FreeBSD-base
FreeBSD-ports
FreeBSD-ports-kmods
FreeBSD-ports: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest",
--
FreeBSD-ports-kmods: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_latest_0",
--
FreeBSD-base: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_0",
root@desktop:~ # pkg upgrade
Updating FreeBSD-ports repository catalogue...
Fetching meta.conf: 100%     168 B   0.2 kB/s    00:01
Fetching data: 100%   716 MiB 125.1 MB/s    00:06
Processing entries:  86%
Unable to update repository FreeBSD-ports
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
Error updating repositories!
Checking for upgrades (142 candidates): 100%
Processing candidates (142 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
root@desktop:~ # freebsd-version
15.0-RELEASE-p11

Otherwise can browse the internet fine. In fact, posting from the desktop right now.
 
Same with FreeBSD 15.1 thick jail. It is painfully slow even though everything was working just fine when I tried it 2-3h ago.

Code:
freebsd 15.1 op@bsd:~ % freebsd-version
15.1-RELEASE-p1

freebsd 15.1 op@bsd:~ % pkg repos
FreeBSD-ports: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-ports-kmods: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_quarterly_1",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-base: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_1",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkgbase-15"
  }

freebsd 15.1 op@bsd:~ % time doas pkg update
Updating FreeBSD-ports repository catalogue...
[bsd.lab.net] Fetching meta.conf: 100%     168 B   0.2 kB/s    00:01
[bsd.lab.net] Fetching data: 100%   716 MiB  23.5 MB/s    00:32
Processing entries:  86%
Unable to update repository FreeBSD-ports
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
Error updating repositories!
552.804u 14.912s 9:57.86 94.9%  2989+208k 0+163332io 886pf+0w
 
Yes, now it is fast again
Code:
root@kg-core2:~ # time pkg upgrade -n
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (5 candidates): 100%
Processing candidates (5 candidates): 100%
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
	libmatroska: 1.7.1 -> 1.7.2 [FreeBSD]

Number of packages to be upgraded: 1

137 KiB to be downloaded.
        0.83 real         0.54 user         0.03 sys
 
The freebsd-announce mailing list had an email recently, "Ports Repository Freeze", that seems to me like it is probably related to this. See that link for the whole thing, but the tl/dr is "a huge file was committed to the repository; we're trying to clean up from it", and quoting its start:
You may have noticed that the ports repository has been frozen for nearly 24
hours now, at the time of writing. Our statement regarding the situation and
next steps follows.
 
The freebsd-announce mailing list had an email recently, "Ports Repository Freeze", that seems to me like it is probably related to this. See that link for the whole thing, but the tl/dr is "a huge file was committed to the repository; we're trying to clean up from it", and quoting its start:
This was an unrelated thing; a change was made to enable the server-side bits for `pkg rwhich`, but it was discovered to have a bug that wasn't obvious in testing due to the difference in orders of magnitude between testing and pkg.f.o. It has since been fixed.
 
Back
Top