Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


upgrading_software_apt_linux_ubuntu_server_22_04_02

This is an old revision of the document!


Upgrading Software with APT on Linux Ubuntu Server 22.04.02

Upgrading software with Apt. Apt, the Advanced Packaging Tool is a command line application at the heart of Debian systems which handles the installation, categorization and removal of applications and their dependencies from the software repositories. Apt is available via the Terminal and we can even administrate systems remotely using a remote connection such as SSH.

First use the Apt “update” command to determine the latest updates that are available from our software repositories for purposes of next upgrading those existing installed applications for which updates are available. To upgrade all of our currently installed software applications on Ubuntu, we can then use the “upgrade” command. Using the “upgrade” command along with first using the “update” command, we can ensure that our software repositories are up-to-date, meaning that any new software is at the latest version. So, the following is the two step process of using Apt to update and upgrade existing installed applications:

1. Open a terminal or SSH to the Ubuntu server and use the update command. The update command will update the list of available software application packages for your machine.

$ sudo apt update

2. Run the upgrade command to download and install the latest software. We can use the -y switch to automatically agree to installing the application upgrade, or don't use the -y switch and answer “yes” or “y” when prompted after submitting the upgrade command.

$ sudo apt upgrade -y

We can also chain together these commands into a one line script. Using “&&” between the commands we can instruct the system to chain the commands to run one after the other. The “&&” means that the second command will only run if the first command runs successfully.

$ sudo apt update && sudo apt upgrade -y 

Example of Update and Upgrade:

user@svr1:~$ sudo apt update
[sudo] password for user:
Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [721 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [927 kB]
Fetched 1,986 kB in 1s (1,386 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
59 packages can be upgraded. Run 'apt list --upgradable' to see them.
user@svr1:~$
user@svr1:~$ sudo apt list --upgradable
Listing... Done
apparmor/jammy-updates 3.0.4-2ubuntu2.2 amd64 [upgradable from: 3.0.4-2ubuntu2.1]
apport/jammy-updates 2.20.11-0ubuntu82.5 all [upgradable from: 2.20.11-0ubuntu82.4]
apt-utils/jammy-updates 2.4.9 amd64 [upgradable from: 2.4.8]
apt/jammy-updates 2.4.9 amd64 [upgradable from: 2.4.8]
bind9-dnsutils/jammy-updates 1:9.18.12-0ubuntu0.22.04.1 amd64 [upgradable from: 1:9.18.1-1ubuntu1.3]
bind9-host/jammy-updates 1:9.18.12-0ubuntu0.22.04.1 amd64 [upgradable from: 1:9.18.1-1ubuntu1.3]
bind9-libs/jammy-updates 1:9.18.12-0ubuntu0.22.04.1 amd64 [upgradable from: 1:9.18.1-1ubuntu1.3]
distro-info-data/jammy-updates 0.52ubuntu0.4 all [upgradable from: 0.52ubuntu0.2]
dpkg/jammy-updates 1.21.1ubuntu2.2 amd64 [upgradable from: 1.21.1ubuntu2.1]
fwupd-signed/jammy-updates 1.51.1~22.04.1+1.4-0ubuntu0.1 amd64 [upgradable from: 1.51~22.04.1+1.2-3ubuntu0.2]
fwupd/jammy-updates 1.7.9-1~22.04.3 amd64 [upgradable from: 1.7.9-1~22.04.1]
iptables/jammy-updates 1.8.7-1ubuntu5.1 amd64 [upgradable from: 1.8.7-1ubuntu5]
isc-dhcp-client/jammy-updates 4.4.1-2.3ubuntu2.4 amd64 [upgradable from: 4.4.1-2.3ubuntu2.3]
isc-dhcp-common/jammy-updates 4.4.1-2.3ubuntu2.4 amd64 [upgradable from: 4.4.1-2.3ubuntu2.3]
libapparmor1/jammy-updates 3.0.4-2ubuntu2.2 amd64 [upgradable from: 3.0.4-2ubuntu2.1]
libapt-pkg6.0/jammy-updates 2.4.9 amd64 [upgradable from: 2.4.8]
libfwupd2/jammy-updates 1.7.9-1~22.04.3 amd64 [upgradable from: 1.7.9-1~22.04.1]
libfwupdplugin5/jammy-updates 1.7.9-1~22.04.3 amd64 [upgradable from: 1.7.9-1~22.04.1]
libgssapi-krb5-2/jammy-updates 1.19.2-2ubuntu0.2 amd64 [upgradable from: 1.19.2-2ubuntu0.1]
libip4tc2/jammy-updates 1.8.7-1ubuntu5.1 amd64 [upgradable from: 1.8.7-1ubuntu5]
libip6tc2/jammy-updates 1.8.7-1ubuntu5.1 amd64 [upgradable from: 1.8.7-1ubuntu5]
libk5crypto3/jammy-updates 1.19.2-2ubuntu0.2 amd64 [upgradable from: 1.19.2-2ubuntu0.1]
libkrb5-3/jammy-updates 1.19.2-2ubuntu0.2 amd64 [upgradable from: 1.19.2-2ubuntu0.1]
libkrb5support0/jammy-updates 1.19.2-2ubuntu0.2 amd64 [upgradable from: 1.19.2-2ubuntu0.1]
libldap-2.5-0/jammy-updates 2.5.14+dfsg-0ubuntu0.22.04.2 amd64 [upgradable from: 2.5.13+dfsg-0ubuntu0.22.04.1]
libldap-common/jammy-updates 2.5.14+dfsg-0ubuntu0.22.04.2 all [upgradable from: 2.5.13+dfsg-0ubuntu0.22.04.1]
libmbim-glib4/jammy-updates 1.28.0-1~ubuntu20.04.1 amd64 [upgradable from: 1.26.2-1build1]
libmbim-proxy/jammy-updates 1.28.0-1~ubuntu20.04.1 amd64 [upgradable from: 1.26.2-1build1]
libmm-glib0/jammy-updates 1.20.0-1~ubuntu22.04.1 amd64 [upgradable from: 1.18.6-1]
libnetplan0/jammy-updates 0.105-0ubuntu2~22.04.3 amd64 [upgradable from: 0.105-0ubuntu2~22.04.1]
libnss-systemd/jammy-updates 249.11-0ubuntu3.9 amd64 [upgradable from: 249.11-0ubuntu3.7]
libpam-systemd/jammy-updates 249.11-0ubuntu3.9 amd64 [upgradable from: 249.11-0ubuntu3.7]
libqmi-glib5/jammy-updates 1.32.0-1ubuntu0.22.04.1 amd64 [upgradable from: 1.30.4-1]
libqmi-proxy/jammy-updates 1.32.0-1ubuntu0.22.04.1 amd64 [upgradable from: 1.30.4-1]
libsasl2-2/jammy-updates 2.1.27+dfsg2-3ubuntu1.2 amd64 [upgradable from: 2.1.27+dfsg2-3ubuntu1.1]
libsasl2-modules-db/jammy-updates 2.1.27+dfsg2-3ubuntu1.2 amd64 [upgradable from: 2.1.27+dfsg2-3ubuntu1.1]
libsasl2-modules/jammy-updates 2.1.27+dfsg2-3ubuntu1.2 amd64 [upgradable from: 2.1.27+dfsg2-3ubuntu1.1]
libsystemd0/jammy-updates 249.11-0ubuntu3.9 amd64 [upgradable from: 249.11-0ubuntu3.7]
libudev1/jammy-updates 249.11-0ubuntu3.9 amd64 [upgradable from: 249.11-0ubuntu3.7]
libxtables12/jammy-updates 1.8.7-1ubuntu5.1 amd64 [upgradable from: 1.8.7-1ubuntu5]
mdadm/jammy-updates 4.2-0ubuntu2 amd64 [upgradable from: 4.2-0ubuntu1]
modemmanager/jammy-updates 1.20.0-1~ubuntu22.04.1 amd64 [upgradable from: 1.18.6-1]
netplan.io/jammy-updates 0.105-0ubuntu2~22.04.3 amd64 [upgradable from: 0.105-0ubuntu2~22.04.1]
open-vm-tools/jammy-updates 2:12.1.5-3~ubuntu0.22.04.1 amd64 [upgradable from: 2:12.1.0-1~ubuntu0.22.04.1]
python3-apport/jammy-updates 2.20.11-0ubuntu82.5 all [upgradable from: 2.20.11-0ubuntu82.4]
python3-problem-report/jammy-updates 2.20.11-0ubuntu82.5 all [upgradable from: 2.20.11-0ubuntu82.4]
python3-software-properties/jammy-updates 0.99.22.7 all [upgradable from: 0.99.22.5]
python3-tz/jammy-updates 2022.1-1ubuntu0.22.04.1 all [upgradable from: 2022.1-1ubuntu0.22.04.0]
software-properties-common/jammy-updates 0.99.22.7 all [upgradable from: 0.99.22.5]
systemd-hwe-hwdb/jammy-updates 249.11.3 all [upgradable from: 249.11.2]
systemd-sysv/jammy-updates 249.11-0ubuntu3.9 amd64 [upgradable from: 249.11-0ubuntu3.7]
systemd-timesyncd/jammy-updates 249.11-0ubuntu3.9 amd64 [upgradable from: 249.11-0ubuntu3.7]
systemd/jammy-updates 249.11-0ubuntu3.9 amd64 [upgradable from: 249.11-0ubuntu3.7]
tcpdump/jammy-updates 4.99.1-3ubuntu0.1 amd64 [upgradable from: 4.99.1-3build2]
tzdata/jammy-updates 2023c-0ubuntu0.22.04.2 all [upgradable from: 2023c-0ubuntu0.22.04.0]
ubuntu-advantage-tools/jammy-updates 27.14.4~22.04 amd64 [upgradable from: 27.13.5~22.04.1]
ubuntu-drivers-common/jammy-updates 1:0.9.6.2~0.22.04.3 amd64 [upgradable from: 1:0.9.6.1]
udev/jammy-updates 249.11-0ubuntu3.9 amd64 [upgradable from: 249.11-0ubuntu3.7]
update-notifier-common/jammy-updates 3.192.54.6 all [upgradable from: 3.192.54.5]
user@svr1:~$
user@svr1:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  apparmor apport apt apt-utils bind9-dnsutils bind9-host bind9-libs distro-info-data dpkg fwupd fwupd-signed iptables
  isc-dhcp-client isc-dhcp-common libapparmor1 libapt-pkg6.0 libfwupd2 libfwupdplugin5 libgssapi-krb5-2 libip4tc2
  libip6tc2 libk5crypto3 libkrb5-3 libkrb5support0 libldap-2.5-0 libldap-common libmbim-glib4 libmbim-proxy
  libmm-glib0 libnetplan0 libnss-systemd libpam-systemd libqmi-glib5 libqmi-proxy libsasl2-2 libsasl2-modules
  libsasl2-modules-db libsystemd0 libudev1 libxtables12 mdadm modemmanager netplan.io open-vm-tools python3-apport
  python3-problem-report python3-software-properties python3-tz software-properties-common systemd systemd-hwe-hwdb
  systemd-sysv systemd-timesyncd tcpdump tzdata ubuntu-advantage-tools ubuntu-drivers-common udev
  update-notifier-common
59 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 22.7 MB of archives.
After this operation, 1,428 kB of additional disk space will be used.
Do you want to continue? [Y/n]
upgrading_software_apt_linux_ubuntu_server_22_04_02.1687138876.txt.gz · Last modified: 2023/06/19 01:41 by wikiadmin