dotfiles/config/scripts/heavyPackages

11 lines
245 B
Plaintext
Raw Permalink Normal View History

2018-01-22 08:29:43 +01: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