snipt

Ctrl+h for KB shortcuts

Bash

Sort Debian installed packages by size

dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k2 -n
https://snipt.net/embed/bc027c19078f75b6b44c8fef438738b9/
/raw/bc027c19078f75b6b44c8fef438738b9/
bc027c19078f75b6b44c8fef438738b9
bash
Bash
1
2019-07-21T21:07:03
True
False
False
/api/public/snipt/6388/
sorting-debian-installed-packages-by-size
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>dpkg-query --show --showformat<span class="o">=</span><span class="s1">&#39;${Package;-50}\t${Installed-Size}\n&#39;</span> <span class="p">|</span> sort -k2 -n </span></pre></div> </td></tr></table>
bash, deb, debian, sort