Beech Rintoul wrote:
On Saturday 20 May 2006 12:56, Eric Schuele wrote:
I'm wondering how others manage a local store of packages... or even if
anyone does this sort of thing. Let me explain...
Some short time back I decided to start stockpiling packages of all the
ports I have installed on my machine. I was/am doing this because I
intend on doing a fresh install to 6.1-RELEASE when I have the time.
But, although I do prefer to compile the ports (as opposed to
downloading the packages) I do not wish to recompile them all *again*,
because it is a significant amount of time. I intend to just transfer
them to the new installation. So I wrote a small script (appended
below, comments welcome) to create packages of everything on my system.
I did that one time, and have since done "make install package clean"
to install new packages, and done "portupgrade -aprR" to upgrade those
While this does seem to work well for me, it has left one problem I did
not foresee. As ports get upgraded, their new package is built and
placed in my package dir, but the *old* port's package is not removed.
So I now have quite a few packages in my package directory that are not
the most recent, and hence are just taking up space.
So my question is:
Is there a way to automatically remove the old packages as existing
packages get upgraded? Or is there some more appropriate means for
generating packages (and keeping them up to date) that I could transfer
to a fresh install (or even another machine for that matter)?
My mk_pkgs.sh. Comments are appreciated.
# This will create a binary package for all ports installed on a machine.
# It will place the packages in /usr/ports/packages/All
mkdir -p $pkg_dir
for dname in *
if [ "$dname" != "pkgdb.db" ]
pkg_create -v -b $dname $pkg_dir/$dname.tbz
Thanks for your help.
Look at man portsclean.
Yes... that's doing the trick. I've used it for cleaning out
unreferenced distfiles.... did not know it cleaned up packages as well.
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"