Home Debian How to List All Upgradable Packages in Ubuntu, Debian & Mint

How to List All Upgradable Packages in Ubuntu, Debian & Mint

A .deb is a software package file containing application files of a particular software and metadata file about its dependencies and versions. The software can be installed from the deb file using dpkg (Debian Package Manager) from the command line or from graphical applications (which use dpkg in the backend).

This format is used in all Debian-based Linux distributions, for example, Ubuntu, Linux Mint, etc. Usually, these distributions have another installation utility that runs on top of dpkg and performs the task of dependency management, which is done by the apt package manager.

Today, we will learn how to list upgradable deb packages, i.e. packages for which a newer version is available in the repositories, in Ubuntu, Debian & Mint.

Update Software Repository Files

First, we need to update the repository index files, which contain metadata of the latest packages available in the repository. To do this, run:

$ sudo apt update
Update Software Repositories
Update Software Repositories

As shown in the output, apt has fetched the latest index files from different repositories (main, universe, restricted). If you pay attention to the last line of output, it tells us that 131 packages can be upgraded, i.e., newer versions are available, and it also literally tells us the apt command to see these packages.

List All Upgradable Packages in Ubuntu

Thus, run the following command to see these upgradable packages.

$ apt list --upgradable
List Upgradable Packages in Ubuntu
List Upgradable Packages in Ubuntu

It shows the name of the package, its newly available version number, and the version number of the already installed package.

Upgrade Packages in Ubuntu

You can now run the following command to upgrade all these packages to the latest available version.

$ sudo apt upgrade
Conclusion

We have learned about deb packages and how the upgradable packages can be listed in Ubuntu using the apt command. Installation, upgradation, and removal of packages are thus quite simplified by apt, instead of directly using dpkg and manually taking the hassle of dependency management.

Learn more about dpkg and apt in their man pages:

$ man dpkg
$ man apt

If you have any questions or feedback, let us know in the comments below!

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.