registry.db getting rather obese (> 600MB) and updates very slow. Anything to do?

Ryan Schmidt ryandesign at
Tue Jun 23 03:12:22 UTC 2020

On Jun 22, 2020, at 17:33, Dave Horsfall wrote:

> On Sun, 21 Jun 2020, Jeffrey Walton wrote:
>> Another PowerMac 10.5 datapoint, if it is helpful:
> On my MacBook Pro (Sierra), it's
> -rw-r--r--  1 root  admin  62558208 Jun 22 08:09 /opt/local/var/macports/registry/registry.db
> And yeah, as Ryan noted later I got lotsa ports installed :-)

That's only 60MB so not very big compared to Ken's 628MB.

>> My MacPorts update recipe is as follows.
>>   /opt/local/bin/port selfupdate
>>   /opt/local/bin/port upgrade outdated
>>   /opt/local/bin/port clean inactive
>>   /opt/local/bin/port -f uninstall inactive
> Is this the "official" care and feeding of MacPorts?

The official routine is:

sudo port selfupdate
sudo port upgrade outdated

Running "sudo port reclaim" should take care of cleaning up things that are no longer needed. (It could of course still be improved to handle additional cases.) MacPorts should prompt you about running reclaim if you haven't done so in awhile.

> My routine (no real reason) is:
> Sunday: port -u uninstall	# Clean out saved ports

This is the same as "sudo port uninstall inactive". I advocate removing this confusing second usage of the -u flag.

> Monday: port selfupdate		# Update itself
> and     port -p upgrade		# And play dumb by answering the questions
> I haven't timed it (but the build takes a heck of a long time sometimes)
> and I'm asked if I want to do a "clean" after two weeks.

Ken's observation is about the amount of time it takes to deal with the registry after a port installation is finished, not the amount of time it takes to build.

> Oh, I use "-p" because I come across the occasional broken port ("guile"
> springs to mind) and I really want to see what can be built after that, instead of waiting for a fix.

You definitely should not use -p with upgrade or install. It will proceed to build ports despite failures to upgrade their dependencies, which you absolutely do not want to do. I've explained why many times before on this list. We really shouldn't allow -p to be used with upgrade or install or should at least print a much more stern warning.

More information about the macports-users mailing list