Skip to content

vikram2327/linux-system-update-script

Linux System Update Script Logo

Linux System Update Script 🚀

License: MIT Latest Release Made with Bash Maintainer

Keep your Debian/Ubuntu system updated, clean, and secure with one Bash script.

A lightweight, automated, and customizable system maintenance tool for Linux.
Perform updates, upgrades, cleanup, and health checks with:
✅ Logs
✅ Summaries
✅ Color-coded output
✅ Built-in log rotation


🔍 About This Project

This project provides a Linux system update automation script built with pure Bash.
It is designed for Debian and Ubuntu systems and helps administrators and developers:

  • Automate system updates (apt-get update)
  • Run safe upgrades (apt-get upgrade and dist-upgrade)
  • Perform system cleanup (autoremove, autoclean, clean)
  • Generate logs and reports for every maintenance run

It’s ideal for:

  • 🖥️ System administrators managing Linux servers
  • DevOps engineers automating maintenance workflows
  • 💻 Developers who want a reliable Ubuntu/Debian update script
  • 🛠️ Anyone who needs a secure, fast, and lightweight Bash maintenance tool

🌟 Features

  • 🔄 One-command system updates (--full)
  • 🖥️ System information summary (OS, kernel, memory, disk)
  • 🩺 Package health check (apt-get check)
  • 🎨 Color-coded output with verbose/quiet modes
  • 📝 Per-run logs stored in /var/log/update-system/
  • 🔄 Log rotation (keeps last 10 runs)
  • 📊 Summary report (packages upgraded, warnings, errors)
  • Lightweight & fast (pure Bash, no dependencies)

🚀 Quick Start

1️⃣ Clone the repo

git clone https://github.com/vikram2327/linux-system-update-script.git
cd linux-system-update-script

2️⃣ Make the script executable

chmod +x update-system.sh

3️⃣ Run it

sudo ./update-system.sh --full --verbose

⚙️ Usage

Usage: ./update-system.sh [OPTIONS]

Options:
  --update         Refresh package index
  --upgrade        Upgrade installed packages
  --dist-upgrade   Perform full upgrade (kernel, dependencies)
  --cleanup        Remove old/unused packages and cache
  --system-info    Show system info summary
  --check          Check for broken dependencies
  --full           Run all steps (info, check, update, upgrade, dist-upgrade, cleanup)
  --verbose        Show full command output in terminal
  --quiet          Only log to file (default)

📂 Logs & Reports

  • Logs are stored per run in:

    /var/log/update-system/update-system-YYYY-MM-DD-HH-MM-SS.log
    
  • Log rotation keeps the last 10 logs only.

  • Example summary report at the end:

    ===== Summary Report =====
    Packages Upgraded : 12
    Warnings          : 0
    Errors            : 0
    Run completed successfully with no errors.
    

📸 Example Output

✅ Example verbose run:

Linux System Update Script Example Output


📦 Roadmap

  • Add --reboot-if-needed flag
  • Add email/Slack notification support
  • Add cron/systemd integration guide
  • Add Docker container support

🤝 Contributing

Contributions are welcome! 🎉 Please read CONTRIBUTING.md for details.

  • Fork the repo
  • Create a feature branch (git checkout -b feature-new)
  • Commit your changes
  • Open a Pull Request

We also follow a Code of Conduct.


🧑‍💻 Maintainer

Vikram@vikram2327 Individual developer passionate about Linux automation and system care.


📜 License

This project is licensed under the MIT License.

Copyright © 2025 Vikram

About

A Bash script to keep Debian/Ubuntu systems updated, clean, and secure with automated apt updates, upgrades, and maintenance.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages