Home Beginner's Guide How to update Ubuntu, Linux Mint by command-line

How to update Ubuntu, Linux Mint by command-line

by Kiran Kumar
Published: Updated:
command-line update ubuntu

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.

Update Manager in Linux Mint

Update Manager in Linux Mint

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
Update command Linux Mint

Update command Linux Mint

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
Upgrade command Linux Mint

Upgrade command Linux Mint

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

You may also like


Bob Pegram January 12, 2018 - 4:18 AM

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?

johnc September 8, 2023 - 9:45 AM

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

Leo 2H September 20, 2018 - 10:19 PM

Thanks for the tutorials, Kumar. Informative and straight to the point.

saiful October 6, 2018 - 12:21 AM

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?

Spenky June 9, 2019 - 11:58 PM

Thank u for your info and to the point instructions. You have made my Linux experience more enjoyable!

Ed September 18, 2019 - 5:36 PM

Thanks for this. The GIU (Linux Mint 18 something or other) wasn’t updating.

patrick havlicek November 30, 2019 - 10:34 AM

very helpful thank you for your time and efforts

Brad January 27, 2020 - 8:09 AM

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.

pat April 1, 2020 - 10:02 PM

thank you for your time

JKC May 15, 2020 - 3:29 AM

Thanks a lot brother!

linux user July 13, 2020 - 2:10 PM

Thank you a lot. This article is straight to the point.

user October 16, 2020 - 5:35 PM

Helps us noobs ) thnx

Elkon January 24, 2021 - 3:51 AM

The best ever Linux/Ubuntu help on the net.
Informative and straight to the point.
Thanks Elkon.


Leave a Comment



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us


©2016-2023 FOSS LINUX



“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.