In Ubuntu, you can find out if a certain package is installed or not by using the dpkg program.
For example, to find out if package Foo is installed:
$ dpkg --get-selections Foo
Wildcards can also be used. For example, to find all the installed packages whose name begins with F:
$ dpkg --get-selections F*
Tried with: Dpkg 184.108.40.206 and Ubuntu 12.04.1 LTS