Based on what I've seen in other threads, I'm confused as to what the expected behavior is of pkg2ng:
pkg2ng simply renames /var/db/pkg to /var/db/pkg.bak:
https://mebsd.com/make-build-your-freeb ... nager.html (Feb 2012)
pkg2ng deletes everything in /var/db/pkg:
http://www.freebsd.org/cgi/query-pr.cgi?pr=171833 (Sep 2012)
pkg2ng does nothing to /var/db/pkg:
http://forums.freebsd.org/viewtopic.php?t=43963 (Dec 2013)
As of right now (February 11th, 2014 w/ FreeBSD 9.2-RELEASE), when moving from pkg_* tools to pkg, you end up with two databases of installed packages. Based on the above linked forum posts and web page, it seemed that in the past, someone working on pkg2ng apparently tried to correct this, but it was later changed to leave it how it works now.
That presents a minor issue with the two databases:
One database will continue to grow, and show the current package versions (what pkg uses).
One database will never grow, and just get stale (leftovers from pkg_*, which should have been removed).
Once converted from pkg_* tools to pkg, is it OK to delete the old package information directories from /var/db/pkg?
It looks like the only two files I need in /var/db/pkg are "local.sqlite", and "repo-*.sqlite". All the other directories (and their files) were for the pkg_* tools.
Is this going to come back and bite me later? Why does pkg2ng no longer try to clean up /var/db/pkg?
pkg2ng simply renames /var/db/pkg to /var/db/pkg.bak:
https://mebsd.com/make-build-your-freeb ... nager.html (Feb 2012)
pkg2ng deletes everything in /var/db/pkg:
http://www.freebsd.org/cgi/query-pr.cgi?pr=171833 (Sep 2012)
pkg2ng does nothing to /var/db/pkg:
http://forums.freebsd.org/viewtopic.php?t=43963 (Dec 2013)
As of right now (February 11th, 2014 w/ FreeBSD 9.2-RELEASE), when moving from pkg_* tools to pkg, you end up with two databases of installed packages. Based on the above linked forum posts and web page, it seemed that in the past, someone working on pkg2ng apparently tried to correct this, but it was later changed to leave it how it works now.
That presents a minor issue with the two databases:
One database will continue to grow, and show the current package versions (what pkg uses).
One database will never grow, and just get stale (leftovers from pkg_*, which should have been removed).
Once converted from pkg_* tools to pkg, is it OK to delete the old package information directories from /var/db/pkg?
Code:
# cd /var/db
# cp -pr pkg pkg.bak
# cd pkg
# find . -type d -exec rm -r {} \;
Is this going to come back and bite me later? Why does pkg2ng no longer try to clean up /var/db/pkg?