Home Linux ServerLinux Fundementals List packages upgradable with apt on Ubuntu

List packages upgradable with apt on Ubuntu

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

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:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign