If you want to check if a particular Debian package is installed on your system, you can use dpkg command with "-s" option, which returns the status of a specified package. Use the following command line to find out whether or not a .deb package is installed.
$ dpkg -s <package-name> | grep Status
For example, to check if tcpdump package is installed:
Status: install ok installed
If a package is not installed, you will see the following message.
dpkg-query: package 'tomcat6' is not installed and no information is available Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents.
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!