Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

How to uninstall JDK from Ubuntu 16.04?

Ads

 
 

Share on Google+Share on Google+

Java Coder
How to uninstall JDK from Ubuntu 16.04?
3 Answer(s)      10 months ago
Posted in : Linux

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

Ads
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