how to remove default-jre java installation from Ubuntu?

不问归期 提交于 2019-12-04 09:11:11
Bary12
sudo apt-get remove default-jre

removes the package "default-jre". all tho you should ask in askUbuntu

To completely remove jdk from your system, follow these below steps:

  1. Type sudo apt-get autoremove default-jdk openjdk- (Don't hit Enter right now).
  2. Now press tab button for 2 or 3 times, you will get list of packages starting with openjdk-.
  3. Look for name like openjdk-11-jdk. You need to get java version, here is 11.
  4. Now complete your command to sudo apt-get autoremove default-jdk openjdk-11-jdk. (Change 11 to your java version)
  5. And Hit Enter button.

Now you have done removing java from your system.

Bary12's answer worked for me:

sudo apt-get autoremove default-jre

You can remove Java 12 using this command--

sudo apt-get remove oracle-java12-installer

you can change the version by changing the 12 to the version present on your computer

then recheck by finding version -

java -version
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!