Mac – Installed MacPorts packages sizes

macports

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.

Best Answer

You could make use of port build in command contents, which gives you the oportunity to do things like that:

port contents --size depof:python27

Grep the lines you need and do the maths :-)

Update: found answer here at guide.macports.

While reading a bit deeper, I found this

port space --units MB --total thisport

which is much more handy then calculating the sum of the size of each file inside a port.