18
Jan

List Installed Packages by Size in Debian

In an embedded system, space is a very valuable commodity.  Sometimes, there are packages that are installed needlessly and they take up space.  A quick way to see the largest installed files in sorted order is:

dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n

Source:commandlinefu.com

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 3 Comments So Far

  • soomebob
    January 1st, 2012 at 11:24 am

    You have typo. Newline is \n instead of n in ${Package}n

  • Derek@TheDailyLinux
    January 3rd, 2012 at 12:55 pm

    Thanks! It has been corrected.

  • castorp
    February 18th, 2012 at 5:44 am

    just setting up low end vps, so real helpful, many thanks

Share your thoughts, leave a comment!