Skip to content

Instantly share code, notes, and snippets.

@spuk-
Created March 12, 2017 00:12
Show Gist options
  • Save spuk-/3b569bca785fa08bf0679e665870dda6 to your computer and use it in GitHub Desktop.
Save spuk-/3b569bca785fa08bf0679e665870dda6 to your computer and use it in GitHub Desktop.
archlinux installed packages list sorted by size
pacman -Qi | awk -F ' *|:' 'BEGIN{mm["KiB"]=1024; mm["MiB"]=1024*1024; } /^Name/ { n=$4 } /^Installed Size/ { s=$5; s=s*mm[$6]; printf "%s %s\n", s, n } ' | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment