List Upgradeable Packages with apt In Ubuntu

Ubuntu uses the apt and apt-get command in order to manage packages. The apt is the next-generation update of the apt-get command and provides the same features with some extra useful features. The apt command can be used to list upgradeable packages before and upgrade.

Update Package and Repository Information with “apt update”

The apt command uses the package repositories in order to get packages and related information. In order to get the latest and up-to-date information about packages, you should update the package information. First, the apt update command will be executed which will contact the repositories and get the latest information about the installed packages.

$ sudo apt update

List Upgradeable Packages with “apt list –upgradeable”

After the latest information is gathered from the repositories this information will be compared with the currently installed packages information. Then the apt list --upgradeable command can be used to list upgradeable packages.

$ sudo apt list
List Upgradeable Packages

The upgradeable packages are listed with the following information. The the first upradeable package line from the output which is like below.

alsa-utils/focal-updates 1.2.2-1ubuntu2 amd64 [upgradable from: 1.2.2-1ubuntu1]
  • alsa-utils is the package name that has an updated version in the repository.
  • focal-updates is the Ubuntu version for the updates which is focal.
  • 1.2.2-1ubuntu2 is the upgradeable or latest version of the package.
  • amd64 is the operating system architecture.
  • 1.2.2-1ubuntu1 is the currently installed old package version.

Upgrade Packages with “apt dist-upgrade”

After getting list of updates and investigating them with the apt list –upgradeable command wecan upgrade these package with the apt dist-upgrade command like below. Alternatively the apt-get dist-upgrade will work too.

$ sudo apt dist-upgrade -y

1 thought on “List Upgradeable Packages with apt In Ubuntu”

  1. What does this mean?

    $ sudo apt list –upgradable -a
    Listing… Done
    libodbc1/xenial 2.3.7 amd64 [upgradable from: 2.3.6-0.1build1]
    libodbc1/hirsute,now 2.3.6-0.1build1 amd64 [installed,upgradable to: 2.3.7]

    $ sudo apt dist-upgrade -y
    Reading package lists… Done
    Building dependency tree… Done
    Reading state information… Done
    Calculating upgrade… Done
    The following packages have been kept back:
    0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.


Leave a Comment