-2

This is what i have, i want the top one gone

Remove the top one

closed as unclear what you're asking by Kusalananda, Anthon, Jeff Schaller, sebasth, Philippos Sep 26 '17 at 12:43

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • So, what prevents you from reaching that goal? – Satō Katsura Sep 26 '17 at 10:40
  • I don't know which commands to run as i can't tell what names the packages go by – Dudus Sep 26 '17 at 10:42
  • As it looks like you are running Ubuntu, you can run "dpkg-query -S /usr/bin/java to discover the package managing the file. You can then use "apt-get remove <package name>" – Raman Sailopal Sep 26 '17 at 10:51
  • 2
    Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools. And at the very least, don't post images containing the wrong commands you ran! Also, you need to tell us what operating system you are using. – terdon Sep 26 '17 at 10:53
1

One is openjdk the other one is oracle java. So what you want to remove is opendjdk.

Assuming this is a .deb based system.

dpkg -l | grep openjdk
apt-get remove packagename

And then remove the packages that you find there. You could also instead of removing it just adjust your default used java with:

update-alternatives --config java

This way you can keep both installations and switch if you ever need the other one.

If it can't find the path to your wanted java you can add it manually by running e.g. this:

alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-oracle/bin/java 3

And then the config command again.

Not the answer you're looking for? Browse other questions tagged or ask your own question.