My 2 paisas

How To Check Which Software Package Is Using More Space

Posted on: November 13, 2009


If you’re running out of disk space and you want to quickly see what packages are using the most space on your hard drive, use the following command

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}’

That will sort the packages by size, putting the largest ones on the bottom. If you only want to see the top few, you can type

tail -n 10

at the end, because in all likeliness you have a *lot* of packages installed


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Links that I liked to save

Blog Stats

  • 45,386 hits
%d bloggers like this: