Site icon Dipin Krishna

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

Exit mobile version