How to shrink: repo-FreeBSD.sqlite

I have a FreeBSD host that's been up for a few years and has been upgraded over that period, the base system is up to date.

I install packages from source with portmaster. Right now, the only packages installed are pkg and portmaster.

I noticed that /var/db/pkg contains:
Code:
-rw-r--r--  1 root  wheel       163 Oct  1  2020 FreeBSD.meta
-rw-r--r--  1 root  wheel       246 Jun  3  2019 custom.meta
-rw-r--r--  1 root  wheel    688128 Sep  8 10:07 local.sqlite
-rw-r--r--  1 root  wheel  53678080 Oct  1  2020 repo-FreeBSD.sqlite
-rw-r--r--  1 root  wheel   4333568 Jun  3  2019 repo-custom.sqlite
-r--r--r--  1 root  wheel   6794730 Sep  5 07:15 vuln.xml

I was surprised to see that local.sqlite is still in use.

My concern is, the size of the sqlite files. Is there any way to shrink them?

Thanks
 
I was surprised to see that local.sqlite is still in use.
Of course it is. That's where your ports/packages are registered. Ports build packages. In the end everything is a package.
 
You can remove repo-FreeBSD.sqlite if you want. It contains the cached catalog of the FreeBSD repository. As soon as you try to install anything from the FreeBSD repositories it's going to download that catalog first (pkg-update(8)), then recreate the repo-FreeBSD.sqlite database again.
 
  • Thanks
Reactions: kbw
Back
Top