Howto find Disk usage of Packages in ubuntu

The following command help you to find the disk space used by different packages in ubuntu

open a terminal window and run the 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.

you can pipe(|} the output for last 10 by using | tail -n 10 at the end of the command

Leave a comment

Your email address will not be published. Required fields are marked *

*

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