How to uninstall JDK from Ubuntu 16.04?

Ads
 

How to uninstall JDK from Ubuntu 16.04?

Hi,

I have previously installed JDK 8 on Ubuntu 16.04 and now want to uninstall. How to uninstall JDK from Ubuntu 16.04?

How I can completely remove Oracle JDK 8 from Ubuntu 16.04? Explain me with commands.

Thanks

View Answers

August 1, 2016 at 8:47 AM

Hi,

Here are the steps to remove oracle JDK 8 from Ubuntu 16.04.

Check the JDK package to be removed

sudo dpkg --list | grep -i jdk

Remove Oracle Java 8

sudo apt-get purge oracle-java8-installer

or

sudo apt-get remove oracle-java8-installer

Check again the JDK packages

sudo dpkg --list | grep -i jdk

Now you have completely removed JDK from your Ubuntu os.

Thanks


August 1, 2016 at 8:48 AM

Hi,

Here is the complete log of the process:

[email protected]:/home/deepak# sudo dpkg --list | grep -i jdk
ii  oracle-java8-installer                      8u101+8u101arm-1~webupd8~2                                  all          Oracle Java(TM) Development Kit (JDK) 8
[email protected]:/home/deepak# sudo apt-get purge oracle-java8-installer
Reading package lists... Done
Building dependency tree        
Reading state information... Done
The following packages will be REMOVED:
  oracle-java8-installer*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 93.2 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 175193 files and directories currently installed.)
Removing oracle-java8-installer (8u101+8u101arm-1~webupd8~2) ...
Purging configuration files for oracle-java8-installer (8u101+8u101arm-1~webupd8~2) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
[email protected]:/home/deepak# java
The program 'java' can be found in the following packages:
 * default-jre
 * gcj-5-jre-headless
 * openjdk-8-jre-headless
 * gcj-4.8-jre-headless
 * gcj-4.9-jre-headless
 * openjdk-9-jre-headless
Try: apt install <selected package>
[email protected]:/home/deepak# sudo dpkg --list | grep -i jdk
[email protected]:/home/deepak#

Thanks


August 2, 2016 at 11:58 PM

Check following video:

Thanks

Ads









Related Tutorials/Questions & Answers:
How to uninstall JDK from Ubuntu 16.04?
How to uninstall JDK 7?
Advertisements
how to find jdk path in ubuntu?
How to install Oracle JDK 8 on Ubuntu?
How to Install Oracle Java JDK 8 in Ubuntu 16.04?
How to install Ubuntu 16.04 LTS?
How to upgrade Ubuntu to Ubuntu 16.04 LTS?
How to download and install Ubuntu 16.04?
How to install Neo4j on Ubuntu 15.10?
How to uninstall old version of Android Studio?
How to download JDK source code?
How to upgrade Ubuntu 16.04 LTS?
How to check Hadoop version in Ubuntu?
How to see ubuntu version on server?
How to install p7zip on Ubuntu 16.04?
how to run jdbc program in linux-ubuntu?
how to run jdbc program in linux-ubuntu?
How to install ffmpeg on Ubuntu 16.04?
How to install JDK in Centos?
How to install JDK 7 in windows
How to install pip on Ubuntu 16.04?
How to install MySQL Server and Client on Ubuntu 16.04?
How to install gtk-doc-tools package in Ubuntu?
How to install virtualbox guest additions in Ubuntu 16.04?
How to install autoconf, automake and libtool in Ubuntu 15.10?
jdk
How to install Eclipse in Ubuntu using terminal?
How To Install Google Chrome on Ubuntu 16.04?
How to install LAMP server on Ubuntu 16.04 LTS?
How to install jre on Ubuntu 16.04 LTS?
unix/ubuntu os

Ads