Skip to content

Instantly share code, notes, and snippets.

@heyLu
Created April 19, 2016 18:04
Show Gist options
  • Save heyLu/487b6cb18829fd471d3c1654adeeed94 to your computer and use it in GitHub Desktop.
Save heyLu/487b6cb18829fd471d3c1654adeeed94 to your computer and use it in GitHub Desktop.
Packages sorted by size
#!/bin/sh
pacman -Qi | grep -e '^Installed Size' -e '^Name' -e '^$' | perl -0777 -pe 's/Name\s+: ([-.a-zA-Z0-9]+)\nInstalled Size\s+: ([^\n]+) ([KM])iB\n/\2\3\t\1/gs' | sort -h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment