pkg: /var/cache/pkg and pkg upgrade, how does this work ?

olli hauer ohauer at
Sun Nov 30 14:50:04 UTC 2014

On 2014-11-30 15:39, Kurt Jaeger wrote:
> Hi!
> I have a host with a up2date /var/cache/pkg/ and a jail with a
> not so up2date pkg collection.
> Now I want to mount /var/cache/pkg into the jail at the same
> location and hope that I do not have to re-fetch all the files.
> Testing this, the problem is: The packages installed in the jail
> are deemed up2date by pkg and they are *not* updated at all ?
> How can I update a jail with the pkg cache from 'above' and avoid
> fetching packages all over again ?

Hi Kurt,

In case your repo is defined this way on your host

  $reponame: {

copy also the $reponame.meta and repo-$reponame.sqlite from /var/db/pkg to the jail.
Additional set "REPO_AUTOUPDATE = false" in the pkg.conf from the jail.

Now the jail has all references for the packages and the update should work.


More information about the freebsd-ports mailing list