#!/bin/bash# Checkifthescriptisrunas rootif [ "$EUID"-ne0 ];thenecho"Please run as root"exit1fiecho"Updating and upgrading current packages..."aptupdate&&aptupgrade-yecho"Installing necessary packages for the upgrade..."aptinstall-yapt-transport-httpsca-certificatesecho"Changing sources.list to Debian 11 (Bullseye)..."sed-i's/buster/bullseye/g'/etc/apt/sources.listsed-i's|buster/updates|bullseye-security|g'/etc/apt/sources.listecho"Updating package lists..."aptupdateecho"Performing the full upgrade to Debian 11..."aptfull-upgrade-yecho"Cleaning up..."aptautoremove--purge-yecho"The upgrade is complete. It is recommended to reboot the system."