Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I haven't cleaned up after MacPorts in, um, ever and I'm trying to cut down on the disk space it's using. The source code for several (but not all) of the ports are still on my disk. Since I've already compiled and installed those ports, is there any reason to keep the source? How can I get MacPorts to remove the source and just keep the compiled binaries? (Or is that the intended behavior; am I finding ports that don't properly clean their sources?)

I've done port uninstall inactive and port clean --all installed. They both greatly helped clean up other stuff, but neither of them got rid of the source code.

Thanks.

share|improve this question

2 Answers 2

up vote 8 down vote accepted

Where are you looking for this source code? MacPorts downloads source packages and stores them in /opt/local/var/macports/distfiles. If you did port clean --all installed then your system should have gotten rid of these source pacakges. You may do better to run port clean --all all to get rid of source packages of software that you may have uninstalled.

However, if you're talking about files stored in /opt/local/var/macports/sources, those are not source packages. Those are the actual MacPorts portfiles, which contain the info for all available ports, including dependencies and build instructions for the port command. Running port clean would not touch that directory.

share|improve this answer
    
So the files I was asking about are in /opt/local/var/macports/software. That's where the installed files go; apparently some ports install .c files. (That was news to me.) Thanks for pointing me in the right direction. –  Evan Nov 15 '10 at 18:18
    
Ah, I see. If you want to verify what files come with a port, you can use port contents <portname>. The .c files should show up, indicating that they are meant to be installed, and not just from the source package. –  fideli Nov 15 '10 at 19:27

I was just working on this today - my MBP had gotten ... rather full ... of bits.

You may also want to look around for builds that never finished - in /opt/local/var/macports/build - and take care of that leftover data as well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.