How do I update Ubuntu using terminal command line
To update your Ubuntu system using the terminal command line, follow these steps:
- Open a terminal window.
- Update the package index:
sudo apt update- Upgrade all installed packages to the latest available version:
sudo apt upgrade- After the upgrade process is completed, you can use the
apt list --upgradablecommand to verify that all upgrades have been installed successfully.
apt-get command is being deprecated and is gradually being replaced by apt, but it still works in Ubuntu.If you also want to upgrade packages that may have a new version of dependencies, use the following command:
sudo apt dist-upgradeAfter the upgrade is complete, it is a good idea to reboot the system to ensure that all the updates have been applied correctly.
