How do is see if a package is installed in Debian?

raksasas

Limp Gawd
Joined
Dec 14, 2002
Messages
477
How do I see if a package is installed in Debian?

In CentOS I would use the following command:
For Apache
Code:
#rpm -q httpd
For MySQL
Code:
#rpm -q mysql-server
for PHP
Code:
#rpm -q php

How do I do the same in Debian?
 
Last edited:
How do I see if a package is installed in Debian?

In CentOS I would use the following command:
For Apache
Code:
#rpm -q httpd
For MySQL
Code:
#rpm -q mysql-server
for PHP
Code:
#rpm -q php

How do I do the same in Debian?

dpkg --get-selections | grep php
 
You could always shorten that up and use -l (list)...

Code:
dpkg -l | grep php
 
I do:

Code:
apt-cache policy php5

Shows you the installed version (if any) and also what version is on the repo...
 
Back
Top