List packages by size
I need that quite often, but keep forgetting the exact syntax (except for Debian, where it's really simple). 😉
RPM-based (Redhat, Fedora, Mandriva, Suse ...)
rpm -qa --queryformat '%{SIZE} %{NAME}\n' | sort -nr | head -20
DPKG-based (Debian, Ubuntu, Sidux ...)
wajig size | sort -k 2 -nr | head -20
Pacman-based (Arch, DeLi, Chakra)
pacman -Qi | awk '/^Installed Size/{print int($4), name} /^Name/{name=$3}' \ | sort -nr | head -20