If you manage more than one Linux server, you probably have this problem.
Server A is Ubuntu. Server B is Fedora. Your workstation is Arch. Each one needs package updates, log cleanup, kernel pruning, security checks.
Every distro has its own package manager. Its own cleanup commands. Its own way of doing things.
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.
Eventually, I got tired of it.
So I built SYSMAINT.
What it does
SYSMAINT is a bash script that unifies system maintenance across Linux distributions. It handles:
- Package updates and upgrades
- Log rotation and cache cleanup
- Old kernel removal
- Security audits (SSH, firewall, services)
- JSON telemetry output
The same command works on:
- Ubuntu, Debian
- Fedora, RHEL, Rocky, Alma, CentOS
- Arch Linux, openSUSE
Why dry-run matters
The feature I'm most proud of is the dry-run mode.
sudo ./sysmaint --dry-run
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.
Then you run the real command:
sudo ./sysmaint
Automation
Once you're comfortable, you can automate it.
# Weekly automated maintenance
sudo ./sysmaint --auto --quiet
Or set up a systemd timer:
sudo systemctl enable --now sysmaint.timer
The JSON output makes it easy to integrate with monitoring tools or log aggregation.
Production ready
I've been running SYSMAINT in production for months. Here's what I've seen:
- Average runtime: 3.5 minutes
- Memory usage: < 50 MB
- Zero unexpected behavior so far
- Consistent results across all 9 supported distros
The project has 500+ tests covering edge cases, error handling, and cross-platform consistency. ShellCheck reports zero errors.
Give it a try
git clone https://github.com/Harery/SYSMAINT.git
cd SYSMAINT
sudo ./sysmaint --dry-run
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.
Let me know what you think, especially if you manage different Linux distributions.

Top comments (0)