This works on any system that uses apt-get.
This command shows the size of the installed packages:
dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{printf "%.3f MB \t %s\n", $2/(1024), $1}'| tail -n 30
You can change the tail -n 30 to any nomber to get more or less packages listed.
If you enjoyed this post, make sure you subscribe to my RSS feed!