dotfiles/config/scripts/heavyPackages

11 lines
245 B
Plaintext
Raw Normal View History

2018-01-22 07:29:43 +00:00
#!/usr/bin/env bash
# Return a list of packages sorted by size
(echo PACKAGE SIZE; \
for A in /var/lib/pacman/local/*/desc; do
(sed -n 2p $A; (grep '^%SIZE%$' $A -A1 | tail -1)) | tr '\n' ' '; echo
done \
| sort -nrk2) \
| column -t