Cleanup of /var/db/pkg/

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Jun 24 07:51:56 UTC 2014


On 06/24/14 07:39, Victor Sudakov wrote:
> Matthew Seaman wrote:
>>
>>> Is it safe to remove all directories and files therein in /var/db/pkg/
>>> after running pkg2ng? 
>>>
>>> Is there anything of value there other than /var/db/pkg/*.sqlite
>>> databases?
>>
>> Generally, yes.  Other than local.sqlite or repo*.sqlite pkg(8) also
>> uses some other bits and pieces like vuln.xml -- but apart from
>> local.sqlite all of those can be downloaded from the net.
>>
>> Note that if you use portmaster(8) it creates per-pkg directories under
>> /var/db/pkg to stash some information about distfiles.  Deleting these
>> will cause nothing worse than portmaster being unable to remove outdated
>> versions of distfiles.
> 
> Yes, I use portmaster.  Would it be wiser then to delete only the 
> '+*' files, like
> 
> find /var/db/pkg/ -type f -name '+*' -delete
> 
> My ultimate goal is to disable the pkg_* tools.

Yes -- IIRC that should work.  Details of how pkg_tools laid out stuff
in /var/db/pkg have grown a bit fuzzy in my memory...

	Cheers,

	Matthew



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1014 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20140624/b957b7f9/attachment.sig>


More information about the freebsd-pkg mailing list