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}' +} +