<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ᙢᓎᕼᗅᙢᙍᗫ ᙍᒪᕼᗅᖇᙍᖇᖻ</title>
    <description>The latest articles on DEV Community by ᙢᓎᕼᗅᙢᙍᗫ ᙍᒪᕼᗅᖇᙍᖇᖻ (@harery).</description>
    <link>https://dev.to/harery</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3690722%2Ff21dfeac-9662-40fd-8c35-2cae4174bc67.jpeg</url>
      <title>DEV Community: ᙢᓎᕼᗅᙢᙍᗫ ᙍᒪᕼᗅᖇᙍᖇᖻ</title>
      <link>https://dev.to/harery</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/harery"/>
    <language>en</language>
    <item>
      <title>I stopped writing separate maintenance scripts for each Linux distro. You can too.</title>
      <dc:creator>ᙢᓎᕼᗅᙢᙍᗫ ᙍᒪᕼᗅᖇᙍᖇᖻ</dc:creator>
      <pubDate>Sat, 03 Jan 2026 04:02:41 +0000</pubDate>
      <link>https://dev.to/harery/i-stopped-writing-separate-maintenance-scripts-for-each-linux-distro-you-can-too-5gfk</link>
      <guid>https://dev.to/harery/i-stopped-writing-separate-maintenance-scripts-for-each-linux-distro-you-can-too-5gfk</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/Harery/SYSMAINT" rel="noopener noreferrer"&gt;SYSMAINT&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you manage more than one Linux server, you probably have this problem.&lt;/p&gt;

&lt;p&gt;Server A is Ubuntu. Server B is Fedora. Your workstation is Arch. Each one needs package updates, log cleanup, kernel pruning, security checks.&lt;/p&gt;

&lt;p&gt;Every distro has its own package manager. Its own cleanup commands. Its own way of doing things.&lt;/p&gt;

&lt;p&gt;I used to maintain a collection of scripts. One for Debian-family systems. One for RedHat. Another for Arch. Every time I added a new server type, I had to write new scripts.&lt;/p&gt;

&lt;p&gt;Eventually, I got tired of it.&lt;/p&gt;

&lt;p&gt;So I built SYSMAINT.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;SYSMAINT is a bash script that unifies system maintenance across Linux distributions. It handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Package updates and upgrades&lt;/li&gt;
&lt;li&gt;Log rotation and cache cleanup&lt;/li&gt;
&lt;li&gt;Old kernel removal&lt;/li&gt;
&lt;li&gt;Security audits (SSH, firewall, services)&lt;/li&gt;
&lt;li&gt;JSON telemetry output&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same command works on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu, Debian&lt;/li&gt;
&lt;li&gt;Fedora, RHEL, Rocky, Alma, CentOS&lt;/li&gt;
&lt;li&gt;Arch Linux, openSUSE&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why dry-run matters
&lt;/h2&gt;

&lt;p&gt;The feature I'm most proud of is the dry-run mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; ./sysmaint &lt;span class="nt"&gt;--dry-run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This shows you exactly what will change before anything happens. No surprises. You can see which packages will be updated, what files will be cleaned, what kernels will be removed.&lt;/p&gt;

&lt;p&gt;Then you run the real command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; ./sysmaint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Automation
&lt;/h2&gt;

&lt;p&gt;Once you're comfortable, you can automate it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Weekly automated maintenance&lt;/span&gt;
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./sysmaint &lt;span class="nt"&gt;--auto&lt;/span&gt; &lt;span class="nt"&gt;--quiet&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or set up a systemd timer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; sysmaint.timer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The JSON output makes it easy to integrate with monitoring tools or log aggregation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Production ready
&lt;/h2&gt;

&lt;p&gt;I've been running SYSMAINT in production for months. Here's what I've seen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Average runtime: 3.5 minutes&lt;/li&gt;
&lt;li&gt;Memory usage: &amp;lt; 50 MB&lt;/li&gt;
&lt;li&gt;Zero unexpected behavior so far&lt;/li&gt;
&lt;li&gt;Consistent results across all 9 supported distros&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project has 500+ tests covering edge cases, error handling, and cross-platform consistency. ShellCheck reports zero errors.&lt;/p&gt;




&lt;h2&gt;
  
  
  Give it a try
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Harery/SYSMAINT.git
&lt;span class="nb"&gt;cd &lt;/span&gt;SYSMAINT
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./sysmaint &lt;span class="nt"&gt;--dry-run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's MIT licensed. The documentation is comprehensive. And there's an interactive mode if you want to explore what it does step by step.&lt;/p&gt;

&lt;p&gt;Let me know what you think, especially if you manage different Linux distributions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Harery/SYSMAINT" rel="noopener noreferrer"&gt;SYSMAINT&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw1iasbfr0gn20z9fsiz0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw1iasbfr0gn20z9fsiz0.png" alt="Core Capabilities" width="491" height="692"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>kernal</category>
      <category>sysmaint</category>
    </item>
  </channel>
</rss>
