Apple - Installed MacPorts packages sizes

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.


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.


To get each port along with a total of all ports just type port space installed

Example output (partial):

57.425 KiB xorg-renderproto @0.11.1_0
7.189 KiB xorg-scrnsaverproto @1.2.2_0
49.408 KiB xorg-videoproto @2.3.3_0
849.766 KiB xorg-xcb-proto @1.12_1
66.130 KiB xorg-xcb-util @0.4.0_0
143.412 KiB xorg-xextproto @7.3.0_0
18.946 KiB xorg-xf86vidmodeproto @2.3.1_0
5.789 KiB xorg-xineramaproto @1.2.1_0
469.177 KiB xorg-xproto @7.0.31_0
171.815 KiB xrender @0.9.10_0
1.344 MiB XviD @1.3.4_0
1.575 MiB xz @5.2.2_0
3.102 MiB yasm @1.3.0_0
707.211 KiB zlib @1.2.8_0
3.645 GiB total

Tags:

Macports