How to install updates on Ubuntu, Linux Mint by Command-line

update by command-line ubuntu

In our second session of Terminal Tuts, we shall learn how to install updates on the Ubuntu based distros by command-line using Terminal. We shall also see how to only install security updates and not all regular updates by command line. This is especially useful when you are pushing the updates via remote login where use of terminal shines!

update by command-line ubuntu

Install Updates on Ubuntu, Linux Mint, and elementary OS from Terminal

Launch Terminal and enter the following commands:

Step 1: Fetch the updates available for your computer using apt-get update command:

sudo apt-get update

Step 2: You can then use apt-get upgrade command will upgrade the current packages

sudo apt-get upgrade

Step 3: Finally use the distribution upgrade command. This command also 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. The dist-upgrade command may therefore remove some outdated and broken packages.

sudo apt-get dist-upgrade

Install Only Security updates on Ubuntu, Linux Mint, and elementary OS from Terminal

At times to save time on 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 a interactive installation, use the display parameter:

sudo apt-get install unattended-upgrades -d

Hi there! I’m Kiran Kumar, founder of I’m an avid Linux lover, and enjoys hands-on with new promising distros. Currently, I’m using Linux Mint as a daily driver and run several other distros such as Fedora, Solus, Ubuntu, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities especially during Winter ;). When I’m not writing for FOSSLinux, I’m seen biking and hiking on scenic trails. Hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more, and spread my love for Linux. If you find time, drop me an email or feedback from ‘Contact’ page. Or simply leave a comment below if you found this article useful. Have a good day!

Leave a Reply

Be the First to Comment!

Notify of