# 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:

1. **Check and install required utilities** (`lsb-release`) if missing.
2. **Update the system package index** (`apt update`) and report if updates are available.
3. **Upgrade current packages** using `apt upgrade` in non-interactive mode.
4. **Display current OS information** (distro name, version, codename).
5. **Check if a newer OS release is available** (e.g., Debian 13, Ubuntu 24).
6. 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 update` again to refresh package index.
    - Perform a **full system upgrade** (`apt full-upgrade`) non-interactively.
7. **Remove old/unused packages** using `apt autoremove`.
8. **Clean cached packages** using `apt autoclean` and `apt clean`.
9. **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).

<span style="color: rgb(224, 62, 45);">**Ins0mniA**</span>