How to uninstall manually installed java? (jdk 8)
23,836
Run:
sudo update-alternatives --remove-all java
sudo update-alternatives --remove-all javac
sudo update-alternatives --remove-all javaws
sudo rm -rf /usr/lib/jvm/jdk1.8.0
Related videos on Youtube
Author by
Community
Updated on September 18, 2022Comments
-
Community over 1 year
I am using Ubuntu 14.04 LTS 64 bit and installed the wrong version of Sun/Oracle's Java JDK (32 bit instead of 64 bit) using the Ask Ubuntu Post
I assume I have to uninstall it now. How can I do that?
-
kos about 9 years@Testing360 No problem :)
-
Rinzwind about 9 yearsThat last command is wrong. It will remove anything below ./jvm/. That could be just jdk1.8.0 but a lot more.
-
kos about 9 years@Rinzwind What could that be, aside from other installations of java, which have been excluded?
-
kos about 9 years@Rinzwind Plus notice that i specified "Assuming you have followed the tutorial exactly as described in the link", which implies the creation of such folder.
-
Rinzwind about 9 years@kos it could also have other versions of Java in /usr/lib/jvm/ and those would be removed as well. Your rm is missing
jdk1.8.0/
. You should expect users to just copy and paste the commands you provide. -
kos about 9 years@Rinzwind Have you read the post? It states: "Assuming that you have only that installation of java", so it's logical that if that's not the case one shouldn't use those commands.
-
Rinzwind about 9 years@jos again: please assume users will just copy and paste commands. You are setting them up for a failure.
-
kos about 9 years@Rinzwind Ok, i changed my answer accordingly