Skip to content

Instantly share code, notes, and snippets.

@tmhedberg
Created June 16, 2011 16:34
Show Gist options
  • Save tmhedberg/1029638 to your computer and use it in GitHub Desktop.
Save tmhedberg/1029638 to your computer and use it in GitHub Desktop.
List installed Arch Linux packages in descending order of size
#!/bin/bash
for pkg in `pacman -Qq`; do
size=`
pacman -Qi $pkg |
grep '^Installed Size' |
awk -F '[[:space:]]+:[[:space:]]+' '{print $2}'
`
echo "$size - $pkg"
done |
sort -hr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment