आपको dpkg -l
उदाहरण द्वारा मुद्रित स्थिति की जांच करने की आवश्यकता है :
$ dpkg -l firefox-esr vim winff
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
+++-====================================-=======================-=======================-=============================================================================
hi firefox-esr 52.9.0esr+build2-0ubunt amd64 Safe and easy web browser from Mozilla
ii vim 2:8.1.1198-0york0~14.04 amd64 Vi IMproved - enhanced vi editor
rc winff 1.5.3-3 all graphical video and audio batch converter using ffmpeg or avconv
यहाँ दोनों स्थापित हैं vim
और firefox-esr
इसलिए आप टाइप कर सकते हैं:
$ dpkg -l firefox-esr | grep -q ^.i && echo This package is installed. || echo This package is NOT installed.
This package is installed.
$ dpkg -l vim | grep -q ^.i && echo This package is installed. || echo This package is NOT installed.
This package is installed.
$ dpkg -l winff | grep -q ^.i && echo This package is installed. || echo This package is NOT installed.
This package is NOT installed.