This is what i have, i want the top one gone
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.
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.