How to remove OpenJDK from Ubuntu Server

You can use the following commands to remove the OpenJDK from Ubuntu 12.04 Server

First check your Java Version

root@ubuntusrv:~# java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Then type the following command to remove all the packages starting with name “openjdk”

root@ubuntusrv:~# sudo apt-get purge openjdk-\*


Finally reboot the server

No comments:

Post a Comment