how to remove distfiles etc. (short of disk space on a laptop)

Ryan Schmidt ryandesign at macports.org
Sun Nov 8 23:50:34 PST 2009


On Nov 6, 2009, at 12:30, Darren Weber wrote:

> We have a laptop that is very short on disk space.  There is a bunch  
> of stuff lying around in:
> /opt/local/var/macports/distfiles/
> /opt/local/var/macports/build/
> /opt/local/var/macports/packages/darwin/i386/*.tbz2
>
> One way to clean up is to run the following:
> sudo rm -rf /opt/local/var/macports/distfiles/*

This is perfectly fine; I remove old distfiles from here by hand all  
the time, as needed.

> sudo rm -rf /opt/local/var/macports/build/*

You can do this, but any incomplete builds probably left a "work"  
symlink in the port's directory (unless you turned off that feature in  
macports.conf). In this case, you can either remove those symlinks by  
hand (or use a "find" construct to nuke them all), or you can "sudo  
port clean" the affected ports instead.

> sudo rm -rf /opt/local/var/macports/packages/*

I don't use packages so I'm not experienced with this directory. I  
believe we may have discussed recently that removal of old packages  
got broken in MacPorts 1.8.0.

> Is it still true that activation entails hard-links from:
> /opt/local/var/macports/software
> into
> /opt/local

Yes, unless you've turned on "direct mode" in macports.conf. I don't  
recommend you do that though.

> If so, it would be a disaster to run (right?):
> sudo rm -rf /opt/local/var/macports/software/*

Yes, that would not be a good idea. It also wouldn't save you any  
space, except for ports which are not active. The better way to  
reclaim the space used by inactive ports would be to "sudo port  
uninstall inactive".




More information about the macports-users mailing list