Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- #When using apt/dpkg, to sort all installed packages, largest first, with human-readable file sizes, on a system with a relatively recent (2013) version of GNU Coreutils, do this:
- dpkg-query -Wf '${Installed-size}\t${Package}\n' | column -t|numfmt --header --field=1 --to=iec|sort -h --reverse|less
- #or if you want largest last, do that without '--reverse'.
- #dpkg-query -Wf '${Installed-size}\t${Package}\n' | column -t|numfmt --header --field=1 --to=iec|sort -h|less
- #note that this is incomplete. it displays kilobytes instead of megabytes, and megabytes instead of gigabytes, and so on.
Advertisement
Add Comment
Please, Sign In to add comment