Update Ubuntu with one cli command

Here is a list of commands to update Ubuntu (or Debian distro) in a with one cli command.

Explained version

sudo apt update && \ # Update repository
sudo apt upgrade -y && \ # Ugprade packages (yes to all)
sudo apt dist-upgrade -y && \ # Dist upgrade packages (yes to all) 
sudo apt autoremove -y && \ #  Removes orphaned packages which are not longer needed from the system, but not purges them
sudo apt autoclean -y && \ #  Cleans obsolete deb-packages, less than clean
sudo apt clean  # Cleans the packages and install script in /var/cache/apt/archives/

Multiline version

sudo apt update && \ 
sudo apt upgrade -y && \ 
sudo apt dist-upgrade -y && \  
sudo apt autoremove -y &&  \
sudo apt autoclean -y && \ 
sudo apt clean  

One line version (use this one!)

sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y && sudo apt clean

Gist file

fast-upgrade.sh

Enjoy IT!, Djacomo