Issue
I have JDK 8 installed in my ubuntu 18.04 system and I now want to upgrade it to JDK 11 using this. I just want to know if this would create any problem or not. Would the older version be removed on upgrading( Actually I want older version to be removed by itself)?
Solution
Do this to uninstall previous versions of openJDK on Ubuntu
sudo apt-get remove openjdk
To remove all of the config files and dependencies.
sudo apt-get purge --auto-remove openjdk*
Then install openJDK 11
sudo apt-get install openjdk-11-jdk
Answered By - Favour Felix Chinemerem
Answer Checked By - Marilyn (JavaFixing Volunteer)