If you have been using Ubuntu and Linux Mint for a while, you might be aware of how to keep your system up to date by graphical user interface method (GUI) using the corresponding Package Manager. Ubuntu users need to use the Ubuntu Software Center, and Linux Mint users can use the Update Manager to keep the system updated with official security fixes and updated apps.
In this beginner’s tutorial, we shall see how to install the same updates by using the command-line method via the Terminal instead of the GUI way. This is typically the first step to go command-line on the approach to learning Linux.
Install Updates on Ubuntu, Linux Mint, and elementary OS from the Terminal
Launch the Terminal App. On Ubuntu, you can do this by going to the “Activities” menu and looking for “terminal” in the search box. You can also use the Ctrl+Alt+T keyboard combination.
Step 1: Update your system’s repository using the apt-get update command. You must enter the admin password when prompted.
sudo apt-get update
Step 2: Once the repo is updated, it’s time to now fetch the updates from the official server and also apply the updates. The apt-get upgrade command will never remove the currently installed packages. New versions of currently installed packages that cannot be upgraded will be left at their current version. Use the apt upgrade command:
sudo apt-get upgrade
That’s it; your system should be updated by now!
[Tip] Using Distribution Upgrade
There is yet another command that you can use instead of apt-get upgrade command. It’s the apt-get dist-upgrade. This command intelligently handles changing dependencies with new versions of packages.
It will attempt to upgrade the most important packages at the expense of less important ones if necessary, to prevent broken installations. The dist-upgrade command may, therefore, remove some outdated and broken packages. You can use it when “Step 2” ends up with an error.
sudo apt-get dist-upgrade
Installing only the security updates
Some times to save time while administrating the remote machines, you may want to launch Terminal and only install the security updates.
You can use the unattended upgrade command, which will silently install updates without user interaction.
sudo apt-get install unattended-upgrades
Instead, if you want to have an interactive installation, use the display parameter:
sudo apt-get install unattended-upgrades -d
13 comments
I am still running Mint 13. I want to upgrade to 14, run all updates, then upgrade to 15, run all updates, then 16, 17.3 and 18.3 with updates for each. I have all the Mint versions burned from ISO files to DVDs. I have copied all of them to a hard drive, each in a different folder, Mint 14-64, Mint 15-64, Mint 16-64, Mint 17.3-64, and Mint 18.3-64.
Will this work? If so, what commands should I use? I assume they would be similar to what you show, but would specify the source drive and folder name for each.
How would I do that?
Thanks.
Might be better to just backup your important files as the upgrade process is not without problems going from Mint 13 to currently mint 21. I think would be better to start with a fresh install IMO the time required to do all that you mentioned and the fact that it may fail anyway you would need to upgrade in each version steps and the upgrade could fail in each of those steps and potentially leave you with having to do a complete install anyway
Thanks for the tutorials, Kumar. Informative and straight to the point.
hi im new to Linux Mint. My update manager is not responding. It indicates that there is/are updates available using the “x” icon but whenever I click it it said that the public key is not available. I used to be working ok, but after an update recently, it went kaput…. any suggestion?
Thank u for your info and to the point instructions. You have made my Linux experience more enjoyable!
Thanks for this. The GIU (Linux Mint 18 something or other) wasn’t updating.
very helpful thank you for your time and efforts
Thank you, but having followed your instructions, I do not see any evidence that anything ran at all. Should I expect to see a record of something having run? I am not seeing any statement of having executed.
thank you for your time
Thanks a lot brother!
Thank you a lot. This article is straight to the point.
Helps us noobs ) thnx
The best ever Linux/Ubuntu help on the net.
Informative and straight to the point.
Thanks Elkon.