removing non-existent ports from /var/db/pkg ?
Jamie Paul Griffin
jamie at kode5.net
Tue Oct 2 10:33:14 UTC 2012
[ Matthew Seaman wrote on Tue 2.Oct'12 at 10:32:56 +0100 ]
> On 02/10/2012 09:08, Anton Shterenlikht wrote:
> > I have on one system:
> >
> > # ls /var/db/pkg
> > apr-1.4.6.1.4.1_1 help2man-1.40.10 pkgconf-0.8.4
> > auditfile help2man-1.40.11 pkgconf-0.8.5
> > autoconf-2.69 help2man-1.40.12 pkgconf-0.8.6
> > automake-1.12.2 libconfuse-2.7 pkgconf-0.8.7_2
> > automake-1.12.3 libxml2-2.7.8_5 pkgconf-0.8.8
> > automake-1.12.4 local.sqlite pkgconf-0.8.9
> > ganglia-monitor-core-3.1.7_4 mpfr-3.1.1 python27-2.7.3_3
> > gcc-4.7.2.20120721 neon29-0.29.6_4 rsync-3.0.9_2
> > gcc-4.7.2.20120728 pcre-8.31_1 sqlite3-3.7.14
> > gcc-4.7.2.20120804 pkg-1.0 subversion-1.7.5
> > gcc-4.7.2.20120825 pkg-1.0.r4 subversion-1.7.6
> > gcc-4.7.2.20120908 pkg-1.0.r4_1 sudo-1.8.5.p3
> > gcc-4.7.3.20120929 pkg-1.0.r5_1 sudo-1.8.6.p3_1
> > gmake-3.82_1 pkg-1.0.r6_1
> > # pkg info -xo gcc-4.7
> > gcc-4.7.3.20120929: lang/gcc47
> > #
> >
> > I wonder why I have old versions of several ports,
> > which no longer exist, e.g. gcc47.
> >
> > I update with portmaster.
> > Does the normal update procedure
> > remove the old version entry
> > from /var/db/pkg if the update
> > has been successful?
>
> This is an unfortunate effect of using pkgng to handle packages and
> portmaster+patches to build them. The old pkg_tools were the owners of
> that whole /var/db/pkg/ sub-directory structure, and used to take care
> of deleting old entries once ports were updated or removed. portmaster
> stores some of its meta-data in those directories but it doesn't itself
> remove any that are out of date. pkg only uses the data in local.sqlite
> -- so there's nothing left willing to clean up the mess.
>
> This is something that should probably be added to the portmaster patch
> when used with pkgng.
Hi Matthew and Anton, so in the meantime what is the best way to clear this old stuff out? I do like to clear out code and files that are redundant, where possible. What would you suggest?
Cheers, Jamie
More information about the freebsd-ports
mailing list