This tutorial will help you to update the latest packages on a Ubuntu system. You can also apply only security updates silently via the command line.

Update Ubuntu Packages

Use the ‘apt update‘ command to download the package information from all the configured sources from all repositories on your system. Then run the upgrade command to upgrade currently installed packages to the latest available versions from the configured sources. Now, run the dist-upgrade which intelligently handles changing dependencies with new versions of packages. It also removes obsolete packages from your system.

Apply Security Updates Only

You may don’t like to update all the packages on your Ubuntu system. But we still recommend you apply security updates to your systems. These upgrades are highly recommended for the production system to keep them secure. Use the unattended upgrade to silently install updates without user interaction on your Ubuntu system. But, if you want to run an interactive installation or upgrade use the (-d) display parameter.


In this quick write-up, you have learned about upgrading packages on Ubuntu via the command line.