❤️ AZDIGI has officially updated to a new blog system. However, some posts may have incorrect or mismatched images. Please click the Report article button at the bottom of the post so AZDIGI can update as quickly as possible. Thank you!

This article will help you to list the packages that can be upgraded with apt in Ubuntu and you can completely upgrade these packages if you want.

I. Introduction

The Ubuntu operating system uses apt and apt-get commands to manage packages. Apt is the next-generation update of the apt-get command and offers similar features with some useful extras. The apt command can list upgradeable packages first and upgrade if you want.

II. List packages upgradable with apt on Ubuntu

Step 1: SSH into your Ubuntu server

To list the packages that can be upgraded with apt in Ubuntu, we first need to SSH or access your VPS/server as root. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

After successfully SSH, we continue with step 2 to perform the command to update the package and repository information on Ubuntu.

Step 2: Update package and repository information

The apt command uses package repositories to get packages and related information. To get the most up-to-date and latest information about packages, you should update information about packages first.

First, we need to run the following command to connect to the repositories and get the latest information about installed packages:

AZDIGI Tutorial
sudo apt update
    

Here are the results of the update on my Ubuntu server:

Upgrade packages on Ubuntu with apt on Unbuntu

Once the latest information is gathered from the repository, it is compared with the package information currently installed on our Ubuntu server and shows how many packages are available in total.

Step 3: List packages that can be upgraded with apt in Ubuntu

Once we know how many packages are available in total, we need to use the following command to list these packages:

AZDIGI Tutorial
apt list --upgradable
    
Upgrade packages on Ubuntu with apt on Unbuntu

Upgradable packages will be listed with the following information:

AZDIGI Tutorial

passwd/focal-updates 1:4.8.1-1ubuntu5.20.04.1 amd64 [upgradable from: 1:4.8.1-1ubuntu5.20.04]

Note:

  • Package name with the update: passwd.
  • Latest version: 1:4.8.1-1ubuntu5.20.04.1
  • OS Architecture: amd64
  • Version being installed (old): 1:4.8.1-1ubuntu5.20.04

Step 4: Upgrade packages on Ubuntu with apt dist-upgrade apt dist-upgrade

After we get the list of updates, let’s upgrade this package with the following command:

AZDIGI Tutorial
sudo apt dist-upgrade -y
    

Then you wait a moment for the process of updating the packets to complete.

Note: Until the update packages are finished, you absolutely must not turn off the Ubuntu server, shutting down the server during this process may cause system errors.

Upgrade packages on Ubuntu with apt on Unbuntu

III. Summary

So with just a few simple steps, you can list the packages that can be upgraded with apt in Ubuntu and proceed to upgrade these packages if you want.

Upgrading the packages on the Ubuntu server in particular and other server operating systems in general will help our system work more stable, have better compatibility and fix some bugs found in earlier versions.

See more useful articles about Ubuntu at the following link:

If you need assistance, you can contact support in the ways below:

Share:
This article has been reviewed by AZDIGI Team

About the author

Thạch Phạm

Thạch Phạm

Đồng sáng lập và Giám đốc điều hành của AZDIGI. Có hơn 15 năm kinh nghiệm trong phổ biến kiến thức liên quan đến WordPress tại thachpham.com, phát triển website và phát triển hệ thống.

10+ years serving 80,000+ customers

Start your web project with AZDIGI