81d53af97157fff02491ea2ed05307ce5e37c7ec

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #2597 from githubhjs/master

List pkgs by size

Diff

 1diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh
 2index 1e15487ba4768d72b0edfbc3deb4496de888278e..28dfb82a5c53e210a8874e81b3f9ab36c16d7c94 100644
 3--- a/plugins/debian/debian.plugin.zsh
 4+++ b/plugins/debian/debian.plugin.zsh
 5@@ -217,3 +217,11 @@ kerndeb () {
 6         "$revision" kernel_image kernel_headers
 7 }
 8 
 9+# List packages by size
10+function apt-list-packages {
11+    dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | \
12+    grep -v deinstall | \
13+    sort -n | \
14+    awk '{print $1" "$2}'
15+}
16+