Debian Full upgrade to the latest OS release automatically
🚀 One-Line Execute:
apt update && apt install -y curl && clear && curl -s https://docs.greenhome.stream/attachments/41 | bash
✅ What This Script Does
This script checks your system and performs a full upgrade to the latest OS release automatically, including repository updates and cleanup.
🔧 Step-by-Step Breakdown:
- Check and install required utilities (
lsb-release) if missing. - Update the system package index (
apt update) and report if updates are available. - Upgrade current packages using
apt upgradein non-interactive mode. - Display current OS information (distro name, version, codename).
- Check if a newer OS release is available (e.g., Debian 13, Ubuntu 24).
-
If a newer release is available:
- Check if it's already in
/etc/apt/sources.list. - If not, update sources to point to the new release.
- Run
apt updateagain to refresh package index. - Perform a full system upgrade (
apt full-upgrade) non-interactively.
- Check if it's already in
- Remove old/unused packages using
apt autoremove. - Clean cached packages using
apt autocleanandapt clean. - Display final OS release information after upgrade is complete.
🛡️ The script is fully automated and handles all prompts silently — no user interaction required except for an optional reboot (not forced by the script).
Ins0mniA
No Comments