pkg update

Matthew Seaman matthew at FreeBSD.org
Mon Jun 8 06:24:59 UTC 2020


On 06/06/2020 08:55, Manish Jain wrote:
> This is a known problem with pkg, which sometimes happens for reasons I
> do not know. The following steps should resolve your issue :
> 
> rm -rf /var/cache/pkg/* /var/db/pkg/repo-*.sqlite
> pkg bootstrap -f
> pkg update -f
> 

Doing this will really spoil your day.  The first command removes all of
the accumulated knowledge your system has about what packages are
installed, meaning the third command will *only* know about pkg(8) for
the forced update.  Recovering from this situation is quite painful.

Even if you did manage to save a list of installed packages this is
still undesirable: you will re-write pretty much everything under
/usr/local to no real benefit.

First, check /etc/pkg/FreeBSD.conf and /usr/local/etc/pkg/repos/*.conf
for typos.  Use `pkg -vv` and look at the 'Repositories' section at the
end of that output to see the ultimate repository configuration pkg(8)
is using.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20200608/3f67040d/attachment.sig>


More information about the freebsd-questions mailing list