How to uninstall JDK from Ubuntu 16.04?

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:

root@deepak-VirtualBox:/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
root@deepak-VirtualBox:/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) ...
root@deepak-VirtualBox:/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>
root@deepak-VirtualBox:/home/deepak# sudo dpkg --list | grep -i jdk
root@deepak-VirtualBox:/home/deepak#

Thanks


August 2, 2016 at 11:58 PM

Check following video:

Thanks









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 JDK 10 in Ubuntu 18.04?
How to Install Oracle Java JDK 8 in Ubuntu 16.04?
How to uninstall old version of Android Studio?
How to install Ubuntu 16.04 LTS?
How to upgrade Ubuntu to Ubuntu 16.04 LTS?
How to download JDK source code?
How to download and install Ubuntu 16.04?
Uninstall TensorFlow 2.0 beta
Uninstall TensorFlow 2.0 beta
How to install Neo4j on Ubuntu 15.10?
How to upgrade Ubuntu 16.04 LTS?
how to install anaconda in ubuntu
How to see ubuntu version on server?
How to install JDK in Centos?
How to check Hadoop version in Ubuntu?
jdk
how to run jdbc program in linux-ubuntu?
How to install JDK 7 in windows
How to install p7zip on Ubuntu 16.04?
how to run jdbc program in linux-ubuntu?
how to modify hosts file in ubuntu
How to install ffmpeg on Ubuntu 16.04?
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?
Uninstall Xcode
MongoDB uninstall windows service
How to install virtualbox guest additions in Ubuntu 16.04?
how to create tar file in ubuntu
how to create tar file in ubuntu
unix/ubuntu os
How to install autoconf, automake and libtool in Ubuntu 15.10?
How to install Eclipse in Ubuntu using terminal?
How to install OpenJDK 8 in Ubuntu 18.04?
Reading from remote files using PHP,Ubuntu and Windows machine.
how to install wireshark 2.6 2 on ubuntu 16.04
how to install anaconda in ubuntu for all users
How to install JDK 17 on Windows 10
How to install JDK 17 on Windows 10
How to install JDK 17 on Windows 10
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?
com.coolerfall - android-app-uninstall-watcher version 1.0.1 Maven dependency. How to use android-app-uninstall-watcher version 1.0.1 in pom.xml?
How to Install and Use PostgreSQL on Ubuntu 18.04
How to Install and Use PostgreSQL on Ubuntu 18.04

Ads