ubuntu can upgrade install all available updates code example
Example: Please install all available updates for your release before upgrading.
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
sudo do-release-upgrade -d -f DistUpgradeViewGtk3