How to check package versions in Debian based Linux distributions such as Ubuntu and Linux Mint

Tuesday, July 30, 2024 at 4:52 PM | 2 min read

Last modified on Sunday, May 24, 2026 at 4:41 AM

#dpkg, #linux, #linux mint, #debian, #ubuntu, #lsblk, #lsmem, #util-linux, #version

Woman comparing information in notebook and carton box

Photo by Liza Summer on pexels.com

Table of Contents

Checking for package versions in Debian based Linux distribution

In order to check for package versions in Debian based Linux distributions such as Ubuntu and Linux Mint, etc., we can run the following commands in Terminal:

dpkg -l packagename

Earlier today I wanted to find out what version of the util-linux package I had in my Linux Mint OS, and I found the following on stackoverflow:

dpkg -l util-linux

And it returned the following in Terminal:

ii util-linux 2.37.2-4ubuntu3.4 amd64 miscellaneous system utilities maria@maria-VirtualBox:~/Desktop/simple-http-server$ which chsh /usr/bin/chsh maria@maria-VirtualBox:~/Desktop/simple-http-server$ dpkg -l util-linux Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-=================-============-================================= ii util-linux 2.37.2-4ubuntu3.4 amd64 miscellaneous system utilities

I found this stdout a bit messy, so I found a short alternative stdout of this command:

dpkg -l | grep util-linux # or dpkg-query -l | grep util-linux

This returned the following:

ii util-linux 2.37.2-4ubuntu3.4 amd64 miscellaneous system utilities

dpkg -l | grep util-linux is my personal preference, but to each his/her own!

Checking for the version of the util-linux package using the lsblk command

If I want to find out what the package version of util-linux is, of which the lsblk command is a part, I could find it by using the lsblk command along with the following flag:

lsblk --version

Which returns something like the following:

lsblk from util-linux 2.37.32

To view the stackoverflow thread where this command was shared, please visit How to upgrade util-linux from 2.32.1 to 2.34 in Redhat.

To learn more about the lsblk command, please visit my article entitled The lsblk command in Linux and what it does.

Checking for the version of the util-linux package using the lsmem command

I also came across the following command on another thread on stackoverflow which is perhaps a bit too succinct for me:

lsmem -V # which returned: lsmem from util-linux 2.37.2

To learn more about the lsmem command, run man lsmem in Terminal.