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 126.96.36.199 and Ubuntu 12.04.1 LTS