sudo -s -- <<EOF
apt-get update
apt-get upgrade -y
apt-get full-upgrade -y
apt-get dist-upgrade -y
apt-get autoremove -y
apt-get autoclean -y
EOF
## Easy Explination
sudo -s -- <<EOF: This command starts a new shell session with elevated privileges (superuser/root) using sudo. The -- is used to indicate the end of command-line options. The <<EOF is a way to provide a block of text (commands in this case) to the shell.
apt-get update: This command updates the local package database. It retrieves the latest information about available packages from the configured software repositories.
apt-get upgrade -y: This command upgrades installed packages to their latest versions. The -y flag is used to automatically answer "yes" to any prompts, ensuring a non-interactive update.
apt-get full-upgrade -y: Similar to upgrade, this command also installs new dependencies or removes obsolete packages if necessary. The -y flag automates the process.
apt-get dist-upgrade -y: This is another way to upgrade the system. It handles changes in dependencies intelligently and may install or remove packages as needed. The -y flag automates the process.
apt-get autoremove -y: This command removes packages that were installed as dependencies for other packages but are no longer needed by any installed software. The -y flag automates the process.
apt-get autoclean -y: This command removes archived package files that are no longer needed. It helps free up disk space. The -y flag automates the process.
EOF: This marks the end of the block of text provided to the shell using <<EOF.