<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>systemd on Nerdsid.com</title><link>https://nerdsid.com/tags/systemd/</link><description>Recent content in systemd on Nerdsid.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 15 Apr 2026 06:39:17 +0000</lastBuildDate><atom:link href="https://nerdsid.com/tags/systemd/index.xml" rel="self" type="application/rss+xml"/><item><title>Linux Journalctl Command Cheat Sheet</title><link>https://nerdsid.com/posts/linux-journalctl-cheatsheet/</link><pubDate>Wed, 15 Apr 2026 06:39:17 +0000</pubDate><guid>https://nerdsid.com/posts/linux-journalctl-cheatsheet/</guid><description>&lt;p>I recently needed to free up disk space by removing old system logs, so I collected the command I used and other useful journalctl commands for future reference.&lt;/p>
&lt;h2 id="disk-usage--vacuum-remove-old-logs">Disk usage &amp;amp; vacuum (remove old logs)&lt;/h2>
&lt;p>Show journal disk usage:&lt;/p>






&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename codeblock__filename--lang">
 
 BASH
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo journalctl --disk-usage&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div>&lt;p>Remove archived journal files until total size is below X:&lt;/p>






&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename codeblock__filename--lang">
 
 BASH
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo journalctl --vacuum-size&lt;span class="o">=&lt;/span>500M&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div>&lt;p>Remove archived journal files older than a time:&lt;/p>






&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename codeblock__filename--lang">
 
 BASH
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo journalctl --vacuum-time&lt;span class="o">=&lt;/span>3d&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div>&lt;p>Remove archived journal files, keeping only the most recent N files:&lt;/p></description></item></channel></rss>