<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Snap &amp;mdash; Bruno&#39;s ramblings</title>
    <link>https://infosec.press/brunomiguel/tag:Snap</link>
    <description>A blog where I ramble about... well... stuff.</description>
    <pubDate>Sun, 24 May 2026 23:27:24 +0000</pubDate>
    <item>
      <title>📝 How to remove &#34;old&#34; versions from snap packages</title>
      <link>https://infosec.press/brunomiguel/how-to-remove-old-versions-from-snap-packages</link>
      <description>&lt;![CDATA[Be careful with this. Don&#39;t remove old versions before ensuring the new package version works as expected.&#xA;&#xA;How to list all the installed versions&#xA;LANG=C snap list --all | awk &#39;/disabled/{print $1, $3}&#39;&#xA;&#xA;How to remove all the old versions in a batch&#xA;LANG=C snap list --all | awk &#39;/disabled/{print $1, $3}&#39; |&#xA;    while read SnapName revision; do&#xA;        sudo snap remove &#34;$SnapName&#34; --revision=&#34;$revision&#34;&#xA;    done&#xA;&#xA;This can save you some disk space, but it can become a headache if you don&#39;t make sure the new snap package version is working well. Also, don&#39;t forget to read the fine manual.&#xA;&#xA;#Linux #Ubuntu #Snap #Tips]]&gt;</description>
      <content:encoded><![CDATA[<h3 id="be-careful-with-this-don-t-remove-old-versions-before-ensuring-the-new-package-version-works-as-expected">Be careful with this. Don&#39;t remove old versions before ensuring the new package version works as expected.</h3>

<p><strong>How to list all the installed versions</strong></p>

<pre><code class="language-sh">LANG=C snap list --all | awk &#39;/disabled/{print $1, $3}&#39;
</code></pre>

<p><strong>How to remove all the old versions in a batch</strong></p>

<pre><code class="language-sh">LANG=C snap list --all | awk &#39;/disabled/{print $1, $3}&#39; |
    while read SnapName revision; do
        sudo snap remove &#34;$SnapName&#34; --revision=&#34;$revision&#34;
    done
</code></pre>

<p>This can save you some disk space, but it can become a headache if you don&#39;t make sure the new snap package version is working well. Also, don&#39;t forget to <a href="https://snapcraft.io/docs/snap-howto" rel="nofollow">read the fine manual</a>.</p>

<p><a href="/brunomiguel/tag:Linux" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Linux</span></a> <a href="/brunomiguel/tag:Ubuntu" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Ubuntu</span></a> <a href="/brunomiguel/tag:Snap" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Snap</span></a> <a href="/brunomiguel/tag:Tips" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Tips</span></a></p>
]]></content:encoded>
      <guid>https://infosec.press/brunomiguel/how-to-remove-old-versions-from-snap-packages</guid>
      <pubDate>Thu, 09 Jan 2025 16:56:49 +0000</pubDate>
    </item>
  </channel>
</rss>