Tuesday, March 23, 2010

List Installed Packages (with file sizes) - Ubuntu


dpkg --get-selections | awk '{printf("echo \"%s:\"`sudo aptitude show %s |grep \"Uncompressed Size:\"` \n", $1, $1 );}' >output.sh
sh output.sh| awk -F: '{printf("%s:%s\n",$1,$3);}' >list.txt
rm output.sh