[Bug 297065] ports-mgmt/pkg: pkg update -r FreeBSD-ports creates the db file with a size of 1.6 Giga(!)bytes

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 26 Jul 2026 13:10:05 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297065

            Bug ID: 297065
           Summary: ports-mgmt/pkg: pkg update -r FreeBSD-ports creates
                    the db file with a size of 1.6 Giga(!)bytes
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: pkg@FreeBSD.org
          Reporter: p5B2EA84B3@t-online.de
          Assignee: pkg@FreeBSD.org
             Flags: maintainer-feedback?(pkg@FreeBSD.org)

After pkg update -r FreeBSD-ports 
the file /var/db/pkg/repos/FreeBSD-ports/db has a size of 1.6GB. I could not
trust my eyes and checked all my boxes and everywhere the same size, also in
jails.

How to reproduce:
rm /var/db/pkg/repos/FreeBSD-ports/*
# pkg update -r FreeBSD-ports
Updating FreeBSD-ports repository catalogue...
Fetching meta.conf: 100%     168 B   0.2 kB/s    00:01    
Fetching data: 100%    12 MiB   3.2 MB/s    00:04    
Processing entries: 100%
FreeBSD-ports repository update completed. 38008 packages processed.
Fetching files: 100%    41 MiB   4.3 MB/s    00:10    
Processing file entries: 100%
FreeBSD-ports is up to date.

ls -l /var/db/pkg/repos/FreeBSD-ports/
total 640 MB
-rw-r--r--  1 root wheel  1,6G 260725_1907 db
-rw-r--r--  1 root wheel    0B 260726_1450 db-journal
-rw-r--r--  1 root wheel    0B 260726_1449 lock
-rw-r--r--  1 root wheel  162B 260726_1449 meta

This smells like a big security problem also.

-- 
You are receiving this mail because:
You are the assignee for the bug.