command

Asked by aneesh

Is there any command to see whether the package is installed or not ?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

dpkg -l | grep packagename

if the line starts with

ii

it is installed

if you get no output or the first 2 characters are not 'ii' then it is not installed or has been installed then removed and the old config is still there (this will be evident with 'rc'). You can remove the rc lines with:

sudo dpkg -P packagename

This will remove the old configs, you can avoid this by using the '--purge' option when using apt-get. eg.

sudo apt-get --purge remove leafpad
instead of just
sudo apt-get remove leafpad

etc

Can you help with this problem?

Provide an answer of your own, or ask aneesh for more information if necessary.

To post a message you must log in.