How To List Available Updates and Updateable Packages with Apt, Apt-Get, Aptitude Commands?


apt and apt-get provides online package update for the deb based distributions. We can list currently available updates of the current system with these apt and apt-get commands in different ways. We can list updateable or upgradeable packages for Linux distributions like Ubuntu, Debian, Mint, Kali etc.

Update Repository/Packages Information

In order to list available package updates, we have to get the latest updates from package repositories. So first we will get latest updates one of the following commands.

$ sudo apt update

OR

$ sudo apt update
Update Repository/Packages Information
Update Repository/Packages Information

We can see in the last line of the screenshot that the total numbers of the available updates are provided which is 3 in this case.

List Available Updates with apt

Now we can list available updates with the apt command by providing list --upgradeable options.

$ apt list --upgradeable
List Available Updates with apt
List Available Updates with apt

We can see that the following information about the updateable packages is provided.

  • `name` of the package
  • `repository` of the package
  • `newer version` of the package
  • `older or current version` of the package

List Available Updates with apt-get

We can also use apt-get command with the specified options where it will provide less information according to apt command.

$ sudo apt-get -u upgrade --assume-no
List Available Updates with apt-get
List Available Updates with apt-get

We can see from the screenshot that only the updateable package names are provided.

List Available Updates with aptitude

We can use  aptitude command in order to list upgradeable packages. We will use the search option where to select the upgrade flagged packages.

$ aptitude search '~U'
List Available Updates with aptitude
List Available Updates with aptitude

Install/Upgrade Available Package Updates with apt, apt-get and aptitude

We can update/upgrade available updates with apt , apt-get and aptitude commands like below.

$ sudo apt dist-upgrade -y

OR

$ sudo apt-get dist-upgrade -y

OR

$ sudo aptitude safe-upgrade
Install/Upgrade Available Package Updates with apt, apt-get and aptitude
Install/Upgrade Available Package Updates with apt, apt-get and aptitude

LEARN MORE  How To Install and Config Polipo Caching Web Proxy On Linux?

Leave a Comment