From ae2f6f34e3c3a335d6cb16df8ea88a709ef6b36b Mon Sep 17 00:00:00 2001 From: Josh Chih-Hsueh Huang Date: Tue, 11 Mar 2014 11:29:25 +0800 Subject: [PATCH] List pkgs by size --- plugins/debian/debian.plugin.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 1e15487ba..28dfb82a5 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/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}' +} +