3

Tip #828   Sorting debian packages installed by size

The command below will give a list of the packages installed on a debian system sorted from smallest to largest (the order can be reveresed by adding an 'r' option to sort - 'sort -k2 -nr').

dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n'  | sort -k2 -n