I use the following command line in the terminal to update, upgrade, clean up and reboot the Ubuntu Server on weekly basis. It's a really important task to keep the server smooth and up to date.
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get autoclean
After the process of updating and cleaning is done, I finally run the reboot command.
That's it. The Ubuntu server will be up and running in a few minutes.