-2

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

Remove the top one

4
  • So, what prevents you from reaching that goal? Sep 26, 2017 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, 2017 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>" Sep 26, 2017 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, 2017 at 10:53

1 Answer 1

2

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 .