You can run the following command:

dpkg -s packagename | grep Status

If your program is installed, you will have an answer like this:

$ dpkg -s libusb-1.0-0-dev | grep Status
Status: install ok installed

But if you have not the program, the answer can be similar to:

$ dpkg -s openjdk-6-jdk | grep Status
dpkg-query: package 'openjdk-6-jdk' is not installed and no information is 
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.