Browse Source

List pkgs by size

Josh Chih-Hsueh Huang 10 years ago
parent
commit
ae2f6f34e3
1 changed files with 8 additions and 0 deletions
  1. 8 0
      plugins/debian/debian.plugin.zsh

+ 8 - 0
plugins/debian/debian.plugin.zsh

@@ -217,3 +217,11 @@ kerndeb () {
         "$revision" kernel_image kernel_headers
 }
 
+# List packages by size
+function apt-list-packages {
+    dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | \
+    grep -v deinstall | \
+    sort -n | \
+    awk '{print $1" "$2}'
+}
+