Last updated on July 12, 2020 by Dan Nanni
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:
$ dpkg -s tcpdump | grep Status
Status: install ok installed
If a package is not installed, you will see the following message.
$ dpkg -s tomcat6 | grep Status
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.
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.
Xmodulo © 2021 ‒ About ‒ Write for Us ‒ Feed ‒ Powered by DigitalOcean