You can use any one of these commands,
apt-cache search <package_name>
aptitude search <package_name>
apt-cache policy <package_name>
sudo apt-get install <package_name> -s
Output:
karthick@Ubuntu-desktop:~$ sudo apt-get install sun-java6-jdk -s
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate
^
to denote starts-with, for exampleaptitude search ^deb
which will list package names start withdeb
instead of containdeb
. There maybe more control chars in the regex, but I don't know any more. – Lenik Dec 27 '10 at 07:02