Checking on dpkg package updates

You can check the version of a Debian package (dpkg) on a Linux system using the command dpkg -s pkgName where pkgName is the name of the package. E.g.:

alice@Wonderland:~$ dpkg -s winetricks
Package: winetricks
Status: install ok installed
Priority: optional
Section: contrib/otherosfs
Installed-Size: 1036
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Multi-Arch: foreign
Version: 20250102-1build1
Depends: aria2 | wget | curl, binutils, wine
Recommends: 7zip | p7zip-full, cabextract, fuseiso | archivemount, pkexec | policykit-1 | kde-cli-tools, sudo, unzip, xdg-utils, xz-utils, zenity | kdialog | x11-utils
Suggests: tor, unrar-free | unrar
Description: simple tool to work around common problems in Wine
 Winetricks lets you install missing DLLs or tweak various Wine settings
 individually.  It also has a menu of supported games/apps for which it
 can do all the workarounds automatically.
 .
 It can be used via GUI or commandline, whichever you prefer; the
 commandline mode is particularly useful as a building block in fancier
 wine frontends and in automated regression testing.
Original-Maintainer: Debian Wine Team <debian-wine@lists.debian.org>
Homepage: https://github.com/Winetricks/winetricks
alice@Wonderland:~$

If you wish to check on whether an upgrade is available for the package, you should first update your local package index to ensure your system knows about the latest versions available in the repositories with the sudo apt update command. If updates are available you will see something like 19 packages can be upgraded. Run 'apt list --upgradable' to see them.

alice@Wonderland:~$ sudo apt update
[sudo: authenticate] Password:               
Hit:1 https://packages.microsoft.com/ubuntu/26.04/prod resolute InRelease      
Get:2 https://esm.ubuntu.com/apps/ubuntu resolute-apps-security InRelease [8,374 B]
Get:3 https://esm.ubuntu.com/apps/ubuntu resolute-apps-updates InRelease [8,226 B]
Get:4 https://esm.ubuntu.com/infra/ubuntu resolute-infra-security InRelease [8,220 B]
Get:5 https://esm.ubuntu.com/infra/ubuntu resolute-infra-updates InRelease [8,219 B]
Get:6 https://esm.ubuntu.com/apps/ubuntu resolute-apps-security/main amd64 Packages [220 kB]
Get:7 https://esm.ubuntu.com/apps/ubuntu resolute-apps-security/main i386 Packages [87.8 kB]
Get:8 http://security.ubuntu.com/ubuntu resolute-security InRelease [137 kB]   
Get:9 http://security.ubuntu.com/ubuntu resolute-security/main i386 Packages [241 kB]
Get:10 http://security.ubuntu.com/ubuntu resolute-security/main amd64 Packages [653 kB]
Get:11 http://security.ubuntu.com/ubuntu resolute-security/main Translation-en [147 kB]
Get:12 http://security.ubuntu.com/ubuntu resolute-security/main amd64 Components [46.7 kB]
Get:13 http://security.ubuntu.com/ubuntu resolute-security/universe amd64 Packages [206 kB]
Get:14 http://security.ubuntu.com/ubuntu resolute-security/universe i386 Packages [119 kB]
Get:15 http://security.ubuntu.com/ubuntu resolute-security/universe Translation-en [68.2 kB]
Get:16 http://security.ubuntu.com/ubuntu resolute-security/universe amd64 Components [55.7 kB]
Hit:17 http://us.archive.ubuntu.com/ubuntu resolute InRelease                  
Get:18 http://us.archive.ubuntu.com/ubuntu resolute-updates InRelease [137 kB] 
Get:19 http://us.archive.ubuntu.com/ubuntu resolute-backports InRelease [137 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu resolute-updates/main amd64 Packages [803 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu resolute-updates/main amd64 Components [110 kB]
Get:22 http://us.archive.ubuntu.com/ubuntu resolute-updates/universe amd64 Packages [374 kB]
Get:23 http://us.archive.ubuntu.com/ubuntu resolute-updates/universe i386 Packages [176 kB]
Get:24 http://us.archive.ubuntu.com/ubuntu resolute-updates/universe amd64 Components [201 kB]
Get:25 http://us.archive.ubuntu.com/ubuntu resolute-backports/universe amd64 Components [1,056 B]
Hit:26 https://dl.winehq.org/wine-builds/ubuntu resolute InRelease             
Fetched 3,954 kB in 20s (198 kB/s)                                             
19 packages can be upgraded. Run 'apt list --upgradable' to see them.
alice@Wonderland:~$ 

If you want to see whether an update is available for a particular dpkg package, e.g., winetricks, you can use the command apt-cache policy pkgName. Because dpkg manages local .deb files and doesn't directly check remote repositories, you need to use APT, which is the frontend for dpkg to compare the installed version against what is available in the repositories.

alice@Wonderland:~$ apt-cache policy winetricks
winetricks:
  Installed: 20250102-1build1
  Candidate: 20250102-1build1
  Version table:
 *** 20250102-1build1 500
        500 http://us.archive.ubuntu.com/ubuntu resolute/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu resolute/universe i386 Packages
        100 /var/lib/dpkg/status
alice@Wonderland:~$

The Installed and Candidate lines indicate whether an update is available.

If the Candidate version is newer (higher) than the Installed version, an update is available. If the version is the same then a newer version is not available.

Alternatively, you can use the command apt list --upgradable pkgName to check on whether an update is available for a single package. If it returns the package name, an update is available. If it returns nothing, the package is already up-to-date.

alice@Wonderland:~$ apt list --upgradable winetricks
alice@Wonderland:~$

To see a list of all packages that you can upgrade, you can use apt list --upgradable.

alice@Wonderland:~$ apt list --upgradable
bind9-dnsutils/resolute-security 1:9.20.24-1ubuntu0.5 amd64 [upgradable from: 1>
bind9-host/resolute-security 1:9.20.24-1ubuntu0.5 amd64 [upgradable from: 1:9.2>
bind9-libs/resolute-security 1:9.20.24-1ubuntu0.5 amd64 [upgradable from: 1:9.2>
gir1.2-soup-3.0/resolute-security 3.6.6-1ubuntu0.2 amd64 [upgradable from: 3.6.>
gnome-shell-common/resolute-security,resolute-security 50.1-0ubuntu1.5 all [upg>
gnome-shell/resolute-security 50.1-0ubuntu1.5 amd64 [upgradable from: 50.1-0ubu>
gvfs-backends/resolute-security 1.60.0-1ubuntu0.2 amd64 [upgradable from: 1.60.>
gvfs-common/resolute-security,resolute-security 1.60.0-1ubuntu0.2 all [upgradab>
gvfs-daemons/resolute-security 1.60.0-1ubuntu0.2 amd64 [upgradable from: 1.60.0>
gvfs-fuse/resolute-security 1.60.0-1ubuntu0.2 amd64 [upgradable from: 1.60.0-1u>
gvfs-libs/resolute-security 1.60.0-1ubuntu0.2 amd64 [upgradable from: 1.60.0-1u>
gvfs/resolute-security 1.60.0-1ubuntu0.2 amd64 [upgradable from: 1.60.0-1ubuntu>
libmspack0t64/resolute-security 0.11-1.1ubuntu0.26.04.1 amd64 [upgradable from:>
libpcre2-16-0/resolute-security 10.46-1ubuntu0.1 amd64 [upgradable from: 10.46->
libpcre2-32-0/resolute-security 10.46-1ubuntu0.1 amd64 [upgradable from: 10.46->
libpcre2-8-0/resolute-security 10.46-1ubuntu0.1 amd64 [upgradable from: 10.46-1>
libpcre2-8-0/resolute-security 10.46-1ubuntu0.1 i386 [upgradable from: 10.46-1b>
libsoup-3.0-0/resolute-security 3.6.6-1ubuntu0.2 amd64 [upgradable from: 3.6.6->
libsoup-3.0-common/resolute-security,resolute-security 3.6.6-1ubuntu0.2 all [up>
alice@Wonderland:~$

Note: resolute appears in the output above because the system is an Ubuntu Linux system running version 26.04 LTS, aka " Resolute Raccoon, of the operating system. You can see the version of Ubuntu with the command lsb_release -a.

alice@Wonderland:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 26.04.1 LTS
Release:	26.04
Codename:	resolute
alice@Wonderland:~$

In the above output, an upgrade is shown for gir1.2-soup-3.0. The apt-cache policy or apt list --upgradable commands.

alice@Wonderland:~$ apt-cache policy gir1.2-soup-3.0
gir1.2-soup-3.0:
  Installed: 3.6.6-1ubuntu0.1
  Candidate: 3.6.6-1ubuntu0.2
  Version table:
     3.6.6-1ubuntu0.2 500
        500 http://security.ubuntu.com/ubuntu resolute-security/main amd64 Packages
 *** 3.6.6-1ubuntu0.1 500
        500 http://us.archive.ubuntu.com/ubuntu resolute-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.6.6-1 500
        500 http://us.archive.ubuntu.com/ubuntu resolute/main amd64 Packages
alice@Wonderland:~$
alice@Wonderland:~$ apt list --upgradable gir1.2-soup-3.0
gir1.2-soup-3.0/resolute-security 3.6.6-1ubuntu0.2 amd64 [upgradable from: 3.6.>
Notice: There are 2 additional versions. Please use the '-a' switch to see them.
alice@Wonderland:~$ 

To upgrade just that particular package, I could use the command sudo apt install pkgName. Though in this case, I know with certainty that the package is installed, if you aren't sure whether a package is installed, but would like to upgrade the package if it isn't installed, you can use the command sudo apt --only-upgrade install pkgName. Using the --only-upgrade flag ensures that the package will only be updated if it is already installed, preventing you from accidentally installing a completely new piece of software if you mistype the name.

alice@Wonderland:~$ sudo apt --only-upgrade install gir1.2-soup-3.0
[sudo: authenticate] Password:               
Upgrading:                      
  gir1.2-soup-3.0  libsoup-3.0-0  libsoup-3.0-common

Summary:
  Upgrading: 3, Installing: 0, Removing: 0, Not Upgrading: 16
  Download size: 327 kB
  Space needed: 2,048 B / 957 GB available

Continue? [Y/n] Y
Get:1 http://security.ubuntu.com/ubuntu resolute-security/main amd64 libsoup-3.0-common all 3.6.6-1ubuntu0.2 [9,580 B]
Get:2 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gir1.2-soup-3.0 amd64 3.6.6-1ubuntu0.2 [22.5 kB]
Get:3 http://security.ubuntu.com/ubuntu resolute-security/main amd64 libsoup-3.0-0 amd64 3.6.6-1ubuntu0.2 [295 kB]
Fetched 327 kB in 5s (63.6 kB/s)    
(Reading database… 287458 files and directories currently installed.)
Preparing to unpack …/libsoup-3.0-common_3.6.6-1ubuntu0.2_all.deb…
Unpacking libsoup-3.0-common (3.6.6-1ubuntu0.2) over (3.6.6-1ubuntu0.1)…
Preparing to unpack …/gir1.2-soup-3.0_3.6.6-1ubuntu0.2_amd64.deb…
Unpacking gir1.2-soup-3.0:amd64 (3.6.6-1ubuntu0.2) over (3.6.6-1ubuntu0.1)…
Preparing to unpack …/libsoup-3.0-0_3.6.6-1ubuntu0.2_amd64.deb…
Unpacking libsoup-3.0-0:amd64 (3.6.6-1ubuntu0.2) over (3.6.6-1ubuntu0.1)…
Setting up libsoup-3.0-common (3.6.6-1ubuntu0.2)…
Setting up libsoup-3.0-0:amd64 (3.6.6-1ubuntu0.2)…
Setting up gir1.2-soup-3.0:amd64 (3.6.6-1ubuntu0.2)…
Processing triggers for libc-bin (2.43-2ubuntu2.4)…
alice@Wonderland:~$ 

If you are performing an upgrade using a newer .deb file that you downloaded from a website, you can upgrade an existing package with sudo apt install ./path/pkgName.deb.

To update all packages from newer packages available from software repositories, you can use the command span apt upgrade.

alice@Wonderland:~$ sudo apt upgrade
[sudo: authenticate] Password:               
Upgrading:                      
  bind9-dnsutils  gnome-shell-common  gvfs-daemons   libpcre2-16-0
  bind9-host      gvfs                gvfs-fuse      libpcre2-32-0
  bind9-libs      gvfs-backends       gvfs-libs      libpcre2-8-0
  gnome-shell     gvfs-common         libmspack0t64  libpcre2-8-0:i386

Summary:
  Upgrading: 16, Installing: 0, Removing: 0, Not Upgrading: 0
16 standard LTS security updates
  Download size: 4,448 kB
  Space needed: 20.5 kB / 957 GB available

Continue? [Y/n] Y
Get:1 http://security.ubuntu.com/ubuntu resolute-security/main i386 libpcre2-8-0 i386 10.46-1ubuntu0.1 [258 kB]
Get:2 http://security.ubuntu.com/ubuntu resolute-security/main amd64 libpcre2-8-0 amd64 10.46-1ubuntu0.1 [257 kB]
Get:3 http://security.ubuntu.com/ubuntu resolute-security/main amd64 bind9-host amd64 1:9.20.24-1ubuntu0.5 [49.8 kB]
Get:4 http://security.ubuntu.com/ubuntu resolute-security/main amd64 bind9-dnsutils amd64 1:9.20.24-1ubuntu0.5 [164 kB]
Get:5 http://security.ubuntu.com/ubuntu resolute-security/main amd64 bind9-libs amd64 1:9.20.24-1ubuntu0.5 [1,316 kB]
Get:6 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gnome-shell amd64 50.1-0ubuntu1.5 [978 kB]
Get:7 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gnome-shell-common all 50.1-0ubuntu1.5 [188 kB]
Get:8 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gvfs-backends amd64 1.60.0-1ubuntu0.2 [357 kB]
Get:9 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gvfs-fuse amd64 1.60.0-1ubuntu0.2 [21.8 kB]
Get:10 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gvfs amd64 1.60.0-1ubuntu0.2 [118 kB]
Get:11 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gvfs-daemons amd64 1.60.0-1ubuntu0.2 [111 kB]
Get:12 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gvfs-libs amd64 1.60.0-1ubuntu0.2 [107 kB]
Get:13 http://security.ubuntu.com/ubuntu resolute-security/main amd64 gvfs-common all 1.60.0-1ubuntu0.2 [11.4 kB]
Get:14 http://security.ubuntu.com/ubuntu resolute-security/main amd64 libmspack0t64 amd64 0.11-1.1ubuntu0.26.04.1 [41.5 kB]
Get:15 http://security.ubuntu.com/ubuntu resolute-security/main amd64 libpcre2-16-0 amd64 10.46-1ubuntu0.1 [241 kB]
Get:16 http://security.ubuntu.com/ubuntu resolute-security/main amd64 libpcre2-32-0 amd64 10.46-1ubuntu0.1 [228 kB]
Fetched 4,448 kB in 2s (2,147 kB/s)     
(Reading database… 287458 files and directories currently installed.)
Preparing to unpack …/00-libpcre2-8-0_10.46-1ubuntu0.1_amd64.deb…
De-configuring libpcre2-8-0:i386 (10.46-1build1), to allow configuration of libp
cre2-8-0:amd64 (10.46-1ubuntu0.1)…
Unpacking libpcre2-8-0:amd64 (10.46-1ubuntu0.1) over (10.46-1build1)…
Preparing to unpack …/01-libpcre2-8-0_10.46-1ubuntu0.1_i386.deb…
Unpacking libpcre2-8-0:i386 (10.46-1ubuntu0.1) over (10.46-1build1)…
Preparing to unpack …/02-bind9-host_1%3a9.20.24-1ubuntu0.5_amd64.deb…
Unpacking bind9-host (1:9.20.24-1ubuntu0.5) over (1:9.20.24-1ubuntu0.4)…
Preparing to unpack …/03-bind9-dnsutils_1%3a9.20.24-1ubuntu0.5_amd64.deb…
Unpacking bind9-dnsutils (1:9.20.24-1ubuntu0.5) over (1:9.20.24-1ubuntu0.4)…
Preparing to unpack …/04-bind9-libs_1%3a9.20.24-1ubuntu0.5_amd64.deb…
Unpacking bind9-libs:amd64 (1:9.20.24-1ubuntu0.5) over (1:9.20.24-1ubuntu0.4)…
Preparing to unpack …/05-gnome-shell_50.1-0ubuntu1.5_amd64.deb…
Unpacking gnome-shell (50.1-0ubuntu1.5) over (50.1-0ubuntu1.4)…
Preparing to unpack …/06-gnome-shell-common_50.1-0ubuntu1.5_all.deb…
Unpacking gnome-shell-common (50.1-0ubuntu1.5) over (50.1-0ubuntu1.4)…
Preparing to unpack …/07-gvfs-backends_1.60.0-1ubuntu0.2_amd64.deb…
Unpacking gvfs-backends (1.60.0-1ubuntu0.2) over (1.60.0-1ubuntu0.1)…
Preparing to unpack …/08-gvfs-fuse_1.60.0-1ubuntu0.2_amd64.deb…
Unpacking gvfs-fuse (1.60.0-1ubuntu0.2) over (1.60.0-1ubuntu0.1)…
Preparing to unpack …/09-gvfs_1.60.0-1ubuntu0.2_amd64.deb…
Unpacking gvfs:amd64 (1.60.0-1ubuntu0.2) over (1.60.0-1ubuntu0.1)…
Preparing to unpack …/10-gvfs-daemons_1.60.0-1ubuntu0.2_amd64.deb…
Unpacking gvfs-daemons (1.60.0-1ubuntu0.2) over (1.60.0-1ubuntu0.1)…
Preparing to unpack …/11-gvfs-libs_1.60.0-1ubuntu0.2_amd64.deb…
Unpacking gvfs-libs:amd64 (1.60.0-1ubuntu0.2) over (1.60.0-1ubuntu0.1)…
Preparing to unpack …/12-gvfs-common_1.60.0-1ubuntu0.2_all.deb…
Unpacking gvfs-common (1.60.0-1ubuntu0.2) over (1.60.0-1ubuntu0.1)…
Preparing to unpack …/13-libmspack0t64_0.11-1.1ubuntu0.26.04.1_amd64.deb…
Unpacking libmspack0t64:amd64 (0.11-1.1ubuntu0.26.04.1) over (0.11-1.1build2)…
Preparing to unpack …/14-libpcre2-16-0_10.46-1ubuntu0.1_amd64.deb…
Unpacking libpcre2-16-0:amd64 (10.46-1ubuntu0.1) over (10.46-1build1)…
Preparing to unpack …/15-libpcre2-32-0_10.46-1ubuntu0.1_amd64.deb…
Unpacking libpcre2-32-0:amd64 (10.46-1ubuntu0.1) over (10.46-1build1)…
Setting up bind9-libs:amd64 (1:9.20.24-1ubuntu0.5)…
Setting up libmspack0t64:amd64 (0.11-1.1ubuntu0.26.04.1)…
Setting up gnome-shell-common (50.1-0ubuntu1.5)…
Setting up libpcre2-16-0:amd64 (10.46-1ubuntu0.1)…
Setting up libpcre2-32-0:amd64 (10.46-1ubuntu0.1)…
Setting up libpcre2-8-0:amd64 (10.46-1ubuntu0.1)…
Setting up libpcre2-8-0:i386 (10.46-1ubuntu0.1)…
Setting up bind9-host (1:9.20.24-1ubuntu0.5)…
Setting up gvfs-common (1.60.0-1ubuntu0.2)…
Setting up gvfs-libs:amd64 (1.60.0-1ubuntu0.2)…
Setting up bind9-dnsutils (1:9.20.24-1ubuntu0.5)…
Setting up gvfs-daemons (1.60.0-1ubuntu0.2)…
Setting up gvfs:amd64 (1.60.0-1ubuntu0.2)…
Setting up gvfs-backends (1.60.0-1ubuntu0.2)…
Setting up gvfs-fuse (1.60.0-1ubuntu0.2)…
Processing triggers for desktop-file-utils (0.28-1build1)…
Processing triggers for hicolor-icon-theme (0.18-2build1)…
Processing triggers for gnome-menus (3.38.1-1ubuntu1)…
Processing triggers for libc-bin (2.43-2ubuntu2.4)…
Processing triggers for man-db (2.13.1-1build1)…
Processing triggers for libselinux1:amd64 (3.9-4build1)…
Processing triggers for libselinux1:i386 (3.9-4build1)…
Processing triggers for libglib2.0-0t64:amd64 (2.88.0-1ubuntu0.1)…
Setting up gnome-shell (50.1-0ubuntu1.5)…
alice@Wonderland:~$