//View Tip #828
Similar Tips
» Top ten running processes
» Count files by type
» Matching files and packages in Debian/Ubuntu
» Get an ordered list of subdirectory sizes
» Randomize lines in a file


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
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

View Comments »


Add your comment

Comments are currently disabled
Equivalent for RPM based systems:

# rpm -qa --queryformat="%{=NAME} %{SIZE}\n" | sort -k2 -n
Posted 2009-06-08 11:14:33
Ricardo Rojas
alias debianpack="dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n'  | sort -k2 -n"

Doing this gives me an error:
Sustitucion Incorrect(Wrong Substitution)
Posted 2009-06-08 14:45:30
Martin Zikmund
maybe a bit simpler :)

# wajig large
Posted 2009-06-08 16:19:10

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit