#!/bin/sh
#
# List package disk usage for the installed packages.

apt-cache -o 'APT::Cache::AllVersions=0' show \
    $(dpkg -l|grep ^ii|awk '{print $2}') | \
    grep -E '^(Package|Installed-Size): ' | \
    perl -ne 'if (/^Package: (.*)/) { $p = $1 };  if (/^Installed-Size: (.*)/)
{ print"$1 $p\n"; $p = 'BUG' }' | \
    sort -rn
