pkg: repository archive entry is too large

Today I noticed the following message while doing pkg upgrade:

Code:
$ doas pkg upgrade; echo $?
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
Updating FreeBSD-ports repository catalogue...
pkg: need to re-create repo FreeBSD-ports to upgrade schema version
Fetching meta.conf: 100%     168 B   0.2 kB/s    00:01    
Fetching data: 100%  9103 KiB   1.9 MB/s    00:05    
pkg: repository archive entry is too large: data
pkg: No signature found
FreeBSD-ports repository is up to date.
All repositories are up to date.
pkg: need to re-create repo FreeBSD-ports to upgrade schema version
pkg: Repository FreeBSD-ports cannot be opened. 'pkg update' required
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
0

So, especially the following outputs are worrying me:

Code:
pkg: need to re-create repo FreeBSD-ports to upgrade schema version
pkg: Repository FreeBSD-ports cannot be opened. 'pkg update' required

And, when running pkg update:

Code:
$ doas pkg update; echo $?
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
Updating FreeBSD-ports repository catalogue...
pkg: need to re-create repo FreeBSD-ports to upgrade schema version
Fetching meta.conf: 100%     168 B   0.2 kB/s    00:01    
Fetching data: 100%  9103 KiB   9.3 MB/s    00:01    
pkg: repository archive entry is too large: data
pkg: No signature found
FreeBSD-ports repository is up to date.
All repositories are up to date.
0

That pkg: repository archive entry is too large: data doesn't look good. I've removed everything under /var/db/pkg/repos/ and ran pkg update again, but to no avail, the message is still present. I've tried to "verify" the local package state, and at least the file itself appears to be OK, but I haven't check its contents yet, and wouldn't know where to begin:

Code:
$ doas sqlite3 /var/db/pkg/local.sqlite "PRAGMA integrity_check"
╭─────────────────╮
│ integrity_check                                    │
╞═════════════════╡
│ ok                                                        │
╰─────────────────╯

The pkg: need to re-create repo message is mentioned in a (very) old thread in this forum, but apparently the message vanished somehow.

Ideas welcome on what to do here, thanks!


Code:
$ doas pkg -vv
Version                 : 2.8.2
libpkg                  : 2.8.2
libarchive              : libarchive 3.8.7
sqlite                  : 3.53.2
openssl                 : OpenSSL 3.5.6 7 Apr 2026
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-15";
HANDLE_RC_SCRIPTS = false;
DEFAULT_ALWAYS_YES = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
    "/etc/pkg/",
    "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
DEVELOPER_MODE = false;
VULNXML_SITE = "https://vuxml.freebsd.org/freebsd/vuln.xml.xz";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
HTTP_USER_AGENT = "pkg/2.8.2";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
    all-depends = "query %dn-%dv";
    annotations = "info -A";
    build-depends = "info -qd";
    cinfo = "info -Cx";
    comment = "query -i \"%c\"";

    comment = "query -i \"%c\"";
    csearch = "search -Cx";
    desc = "query -i \"%e\"";
    download = "fetch";
    iinfo = "info -ix";
    isearch = "search -ix";
    prime-list = "query -e '%a = 0' '%n'";
    prime-origins = "query -e '%a = 0' '%o'";
    leaf = "query -e '%#r == 0' '%n-%v'";
    list = "info -ql";
    noauto = "query -e '%a == 0' '%n-%v'";
    options = "query -i \"%n - %Ok: %Ov\"";
    origin = "info -qo";
    orphans = "version -vRl?";
    provided-depends = "info -qb";
    rall-depends = "rquery %dn-%dv";
    raw = "info -R";
    rcomment = "rquery -i \"%c\"";
    rdesc = "rquery -i \"%e\"";
    required-depends = "info -qr";
    roptions = "rquery -i \"%n - %Ok: %Ov\"";
    sets = "info -d -C -x '^FreeBSD-set-'";
    shared-depends = "info -qB";
    show = "info -f -k";
    size = "info -sq";
    unmaintained = "query -e '%m = \"ports@FreeBSD.org\"' '%o (%w)'";
    runmaintained = "rquery -e '%m = \"ports@FreeBSD.org\"' '%o (%w)'";
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = true;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
IP_VERSION = 0;
AUTOMERGE = true;
MERGETOOL = "";
VERSION_SOURCE = "";
CONSERVATIVE_UPGRADE = true;
FORCE_CAN_REMOVE_VITAL = true;
PKG_CREATE_VERBOSE = false;
AUTOCLEAN = false;
AUTOREMOVE = false;

DOT_FILE = "";
DEBUG_SCHEDULER_DOT_FILE = "";
REPOSITORIES {
}
VALID_URL_SCHEME [
    "pkg+http",
    "pkg+https",
    "https",
    "http",
    "file",
    "ssh",
    "tcp",
]
WARN_SIZE_LIMIT = 1048576;
METALOG = "";
IGNORE_OSVERSION = false;
IGNORE_OSMAJOR = false;
BACKUP_LIBRARIES = false;
BACKUP_LIBRARY_PATH = "/usr/local/lib/compat/pkg";
PKG_TRIGGERS_DIR [
    "/usr/share/pkg/triggers/",
    "/usr/local/share/pkg/triggers",
]
PKG_TRIGGERS_ENABLE = true;
AUDIT_IGNORE_GLOB [
]
AUDIT_IGNORE_REGEX [
]
COMPRESSION_FORMAT = "";
COMPRESSION_LEVEL = -1;
REPO_ACCEPT_LEGACY_PKG = false;
FILES_IGNORE_GLOB [
]
FILES_IGNORE_REGEX [
]
SHLIB_PROVIDE_PATHS_NATIVE [
]
SHLIB_PROVIDE_PATHS_COMPAT_32 [
]
SHLIB_PROVIDE_PATHS_COMPAT_LINUX [
]
SHLIB_PROVIDE_PATHS_COMPAT_LINUX_32 [
]
SHLIB_PROVIDE_IGNORE_GLOB [
]
SHLIB_PROVIDE_IGNORE_REGEX [

SHLIB_PROVIDE_PATHS_COMPAT_LINUX_32 [
]
SHLIB_PROVIDE_IGNORE_GLOB [
]
SHLIB_PROVIDE_IGNORE_REGEX [
]
SHLIB_REQUIRE_IGNORE_GLOB [
]
SHLIB_REQUIRE_IGNORE_REGEX [
]
PKG_DEBUG_FLAGS [
    "all",
]
COMPRESSION_THREADS = -1;
PKG_REINSTALL_ON_OPTIONS_CHANGE = true;
TRACK_LINUX_COMPAT_SHLIBS = false;
PKG_RWHICH_DATABASE = true;
ABI = "FreeBSD:15:aarch64";
ALTABI = "freebsd:15:aarch64:64";
OSVERSION = "1501000";

Repositories:
  FreeBSD-ports-kmods: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:aarch64/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:aarch64/base_release_1",
    enabled         : no,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkgbase-15"
  }
  FreeBSD-ports: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:aarch64/latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
 
Back
Top