Possible Duplicate:
How can I check if a package is installed (no superuser privileges)
I want a shell script method to test/report if a package is installed. I don't need details, only a yes/no.
I've come up with this method. Is there a more direct way?
is_installed=0
test_installed=( `apt-cache policy domy-ce | grep Installed: ` )
[ ! "${test_installed[1]}" == "(none)" ] && is_installed=1