Automated system maintenance for Ubuntu — one command, all updates, one log.
Runs all maintenance tasks in sequence:
- apt update — refresh package lists
- apt upgrade — install available updates
- apt autoremove — remove unused packages
- apt autoclean — clear repository cache
- Kernel cleanup — remove old kernels, keep newest 2
- npm update — update Node.js package manager
- pipx update — update Python tool installer
- rkhunter refresh — re-baseline after updates
I used to forget one step, then wonder why something broke. Now it's one command, one run, one log. Consistency beats memory.
- Ubuntu (tested on 22.04+)
sudoaccess- Internet connection (for updates)
Auto-installed if missing:
byobu(providespurge-old-kernels)
# Clone
git clone https://github.com/AhmadMWaddah/SysMaint.git
cd SysMaint
# Make executable
chmod +x SysMaint.sh
# Run
./SysMaint.sh./SysMaint.sh helpSysMaint/
├── SysMaint.sh # Main entry point
├── lib/
│ ├── colors.sh # Terminal colors
│ ├── runner.sh # Module loader
│ ├── state.sh # State tracking
│ ├── ui.sh # Print functions
│ └── utils.sh # Utility functions
└── modules/
├── apt.sh # System update/upgrade
├── kernel.sh # Old kernel cleanup
├── npm.sh # npm self-update
└── pipx.sh # pipx self-update
MIT
