Posted: . At: 9:32 AM. This was 4 years ago. Post ID: 14315
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How to list certain installed packages on Debian Linux.


The dpkg command can be used to list all installed packages. I wanted to list the language packs installed with Firefox. So the command below is perfect.

jason@Yog-Sothoth:~$ dpkg --list firefox-locale-*
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  firefox-locale-de              75.0+build3-0ubuntu0 amd64                German language pack for Firefox
ii  firefox-locale-en              75.0+build3-0ubuntu0 amd64                English language pack for Firefox
ii  firefox-locale-es              75.0+build3-0ubuntu0 amd64                Spanish; Castilian language pack for Firefox
ii  firefox-locale-fr              75.0+build3-0ubuntu0 amd64                French language pack for Firefox
ii  firefox-locale-it              75.0+build3-0ubuntu0 amd64                Italian language pack for Firefox
ii  firefox-locale-pt              75.0+build3-0ubuntu0 amd64                Portuguese language pack for Firefox
ii  firefox-locale-ru              75.0+build3-0ubuntu0 amd64                Russian language pack for Firefox
ii  firefox-locale-zh-hans         75.0+build3-0ubuntu0 amd64                Simplified Chinese language pack for Firefox

Another example, I am listing all packages that match for the word chrome.

jason@Yog-Sothoth:~$ dpkg --list chrom*
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
+++-==============================-====================-====================-==================================================================
rc  chrome-gnome-shell             10-1                 all                  GNOME Shell extensions integration for web browsers
un  chromedriver                   <none>               <none>               (no description available)
un  chromium                       <none>               <none>               (no description available)
ii  chromium-browser               81.0.4044.122-0ubunt amd64                Chromium web browser, open-source version of Chrome
un  chromium-browser-inspector     <none>               <none>               (no description available)
ii  chromium-browser-l10n          81.0.4044.122-0ubunt all                  chromium-browser language packages
un  chromium-codecs-ffmpeg         <none>               <none>               (no description available)
ii  chromium-codecs-ffmpeg-extra   81.0.4044.122-0ubunt amd64                Extra ffmpeg codecs for the Chromium Browser
un  chromium-driver                <none>               <none>               (no description available)

This is how to get the version of an installed package.

jason@Yog-Sothoth:~$ dpkg -s firefox | grep Version | cut -d" " -f2
75.0+build3-0ubuntu0.18.04.1

This is a very useful Linux tip.

Count the number of installed packages.

jason@Yog-Sothoth:~$ dpkg --list mate* | wc -l
82

This shows that I have 82 packages installed for the MATE desktop. This shows that dpkg is very useful to know about when using Debian or Ubuntu. It can list all packages installed with something like Firefox and list all language packs that you have installed. Very useful information when you wish to remove some of them and you need to know which are actually installed on your system.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.