We have to update the applications we use very often. It's also not different if you are using Ubuntu. And if you don't like the Software Updater GUI, then this post is for you. In this post, I'll talk about how to update your application and Ubuntu itself using just the terminal.
How to Update All the Apps at Once
Linux has an awesome centralized package management system. It makes it so easy for users to install, update, remove their applications. To check for updates, run-
sudo apt update
This command fetches the package lists from the server and checks if there's any update available. Now, if you want to update your apps, run-
sudo apt upgrade
This command will tell you how many packages are out of date and how much bandwidth fetching the updates will cost. It'll then ask you if you want to continue with the process. Note that it'll update the apps only. To update the Ubuntu OS, run-
sudo apt dist-upgrade
Same as the upgrade
command, it'll also prompt you with some information and ask you if you want to continue with the upgradation process. If everything goes fine, then you may now have a lot of old apps and packages. To remove them, run-
sudo apt autoremove
You may now have to reboot the system. Because, if the Linux kernel gets updated, the updates won't get applied until the current session gets terminated to avoid any disruption. To restart your system, run-
sudo apt reboot
How to Update a Single App
You may not want to update all the applications and the system at once. To update a single app, first check if any update is available by running-
sudo apt update
Then run the following command to update the app you want-
sudo apt install package-name
This command will just update the specified application. When specifying a package name, unlike the sudo apt upgrade
, you won't be prompted with a confirmation question. It will start downloading the package straight off.
How to Update the Ubuntu Version
If there's a new Ubuntu release is available, then just the sudo apt dist-upgrade
isn't enough. Don't worry, there's another nifty command available to update Ubuntu to the latest version. To do a release upgrade, run-
sudo do-release-upgrade
Note that sometimes it won't work and will say No release found
. If you see this in the terminal, you'll have to pass the -d
argument. Because Ubuntu takes some time before making the release available as a stable version. It can take a few days from the release date. But if you don't want to wait, you can install the development release by running-
sudo do-release-upgrade -d
This command will ask you some questions before starting the upgradation process. Sometimes, it won't work because of unavailability of a package named update-manager-core
. To install it, run-
sudo apt install update-manager-core
After the installation completes, run the do-release-upgrade
command again.
Note: Before doing a release upgrade, you'll have to run the upgrade
and dist-upgrade
commands.
Conclusion
If you have come to this point and run all the above commands, then you may now have a completely up-to-date Ubuntu system! Congratulations! Don't forget to share the blog and post your thought below!
Tips
Your system might have got full of junk files after the upgradation process, and the built-in commands aren't enough for removing them. You should better install a package called Stacer. It's like the CCleaner for Linux! It has a great GUI and many features that will satisfy your needs very well. To install it, run-
sudo apt install stacer
Then launch Stacer by running-
stacer
Have a clean system!
Leave a comment