If you’re like me, you’ll try every package in the Ubuntu Repository. I just love to try different applications. But then I end up having zillions of applications on my laptop and hardly any disk place. Thats when I start pruning. But for that I need to know what to prune. Thats what the following script does. It lists and sorts all the installed deb packages according to size.

perl -ne '$pkg=$1 if m/^Package: (.*)/; print "$1\t$pkg\n" if m/^Installed-Size: (.*)/;' < /var/lib/dpkg/status | sort -rn | less

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Also Like

Error While Parsing Json using Python – TypeError: list indices must be integers, not str

Jotting this down for fellow googlers. I recently started learning a bit…