Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Can I retrieve a list of the sizes of MacPorts installed packages?

Yes, I know they are compiled from sources, but if a list of generated files is known, it should be computable anyway.

share|improve this question

2 Answers 2

Using the command:

du -sh /opt/local/var/macports/software/*

echos back all directories and sizes of your installed ports.

Use the command:

port -d echo installed

echoes a listing of the ports installed.

share|improve this answer
    
Oh. I didn't know they were neatly installed in separate directories :) –  Lohoris Oct 8 '11 at 12:13
    
Oh, they aren't. In those directories I just have the tarballs. I want to know the full current installed size. –  Lohoris Oct 8 '11 at 12:16

Well, by default they install to /opt/local so it should be as easy as cd /opt/local && du -sh * to get a list of the file sizes. Not sure if it's built into MP by default to give you overall sizes

share|improve this answer
    
Why not just du -sh /opt/local? –  EmmEff Oct 7 '11 at 15:06
    
That works as well, I like being in the directory to start tinkering so go down the cd path ;) –  Nicholas Smith Oct 7 '11 at 15:14
    
???. I'd like to know the single package size, not the sum of all the macports. –  Lohoris Oct 8 '11 at 12:16

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.