# The largest 30 packages on your system



## johnblue (Dec 21, 2009)

Found this while surfing:
	
	



```
#!/bin/sh

# top30ports.sh
# it shows a listing of the 30 largest ports 

top=30
newline='\
'

echo "The largest $top packages on your system"
echo "--------------------------------------"
echo "Size (kB)   Package"
echo "--------------------------------------"

pkg_info -as | \
         tr '\n' ' ' | \
         sed -e 's/Package Size://g' \
                 -e "s/(1K-blocks)/$newline/g" | \
         tr ':' ' ' | \
         awk '{print$4,"     ",$3}' | \
         sort -gr | \
         head -"$top"
```

Taken from: http://tutorials.papamike.ca/pub/fbsd-ports2.html


----------



## achix (Dec 21, 2009)

Or just

```
pkg_info -as | tr '\n' ' ' | sed -e 's/Package Size://g' -e 's/(1K-blocks)/\\
/g' | awk '{print $4 " "$3}' | sort -gr
```


----------

