summarylogtreecommitdiffstats
path: root/package-sizes
blob: 3da38c1130d5d07cecc5146087e2ea14f9518146 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# list pacman packages sorted by their "removable size".
#
# removable size is the space that will be freed up if
# you remove that package with `pacman -Rs <package>`.
#
# only explicitly installed packages are included.
#
# requires pacutils.

pacman -Qqt | pacinfo --removable-size | awk '
    /^Name:/ { name = $2 }
    /^Installed Size:/ { size = $3$4 }
    /^$/ { print size" "name }
' | sort -uk2 | sort -rh | ${PAGER:-less}