How to upgrade installed packages using Terminal on Ubuntu/Linux machine?
Use the upgrade
command to upgrade all installed packages to their latest available versions without modifying anything on a Ubuntu/Linux machine.
This command will not corrupt the installed packages or the applications using them.
Use the below command to update the installed packages list.
sudo apt-get update
Use the below command to upgrade all installed packages to their latest versions available.
In case of any upgrades, the command will show a list of upgrades for the user's confirmation to proceed.
Answer y for yes and press Enter to continue with the upgrade.
sudo apt-get upgrade
Optionally, use the below command to upgrade all installed packages to their latest versions available, and also add or remove any additional dependencies as needed.
The below command will add or remove any additional dependencies required during the upgrade as needed.
sudo apt-get dist-upgrade