Old ports

Adam Dershowitz dersh at alum.mit.edu
Wed Jun 16 09:00:02 PDT 2010


Thanks much.


--Adam



On Jun 15, 2010, at 6:32 PM, Ryan Schmidt wrote:

> On Jun 15, 2010, at 18:36, Scott Webster wrote:
>> On Tue, Jun 15, 2010 at 2:25 PM, Adam Dershowitz wrote:
>>> However, I just noticed that macports seems to still leave around the distribution files.  For example, I have qt4-mac installed, and a few old versions from prior updates.  But I have a number of prior distributions, going back even further, and each one is ~100 meg.  So just my /opt/local/var/macports/distfiles/qt4-mac directory is 1.5 gig!
>>> 
>>> My question is whether there is an easy way to clean out all of the old distributions?  I suppose I could just go and search through every one and rm any old ones that I don't want, but that seems like a bunch of extra work (and could it confuse macports?).
>>> Is the right way to go just to do:
>>> 
>>> sudo port clean --all uninstalled
>> 
>> Since in this case you have qt4-mac installed, I don't think the above
>> command will remove the dist files.  So you could try "sudo port clean
>> --all installed" instead.  But if you have dist files around from
>> ports that you have previously uninstalled then you might also need
>> your above command, or maybe the seemingly more comprehensive "sudo
>> port clean --all all".  You might want to use the -f flag too for
>> ports that share the same distfile directory.  This takes a while
>> though, and perhaps you don't have so many ports that you've
>> uninstalled.  When you uninstall ports it says "--->  Cleaning
>> portname" but I guess that probably only removes the work files and
>> not the dist files.
> 
> I do a lot of port testing, on a number of machines, even sometimes going back to older port versions, and I often work on slow network connections or offline, so I like to keep distfiles around. But not forever. Here's the script I run periodically that deletes distfiles older than a year; you can easily adjust this to delete distfiles sooner. Run the script with sudo so it has sufficient permission to delete the files.
> 
> <deleteolddistfiles>



More information about the macports-users mailing list