Completely Uninstall and Reinstall OpenJDK
If you are trying to remove OpenJDK 6, try
1 | sudo apt-get remove openjdk-6-jdk |
or,
1 | sudo apt-get remove default-jdk |
apt-cache
search only shows you available packages, not the packages you have installed. For that, try
1 | sudo dpkg --list |
The following command will show any JDK-related packages installed on your system.
1 | sudo dpkg --list | grep -i jdk |
Reference:
http://askubuntu.com/questions/139702/completely-uninstall-and-reinstall-openjdk