Uninstalling Java 11 on Ubuntu

Technical Articles

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US

Java SE Development Kit 11

  1. Open a terminal.

  2. Execute the following commands:

    sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk1.11.0/bin/java"
    sudo update-alternatives --remove "javac" "/usr/lib/jvm/jdk1.11.0/bin/javac"    
    sudo update-alternatives --remove "javaws" "/usr/lib/jvm/jdk1.11.0/bin/javaws"
    sudo rm -r /usr/lib/jvm/jdk1.11.0
    
    Note:

    Replace "jdk1.11.0" in each of the above commands with the path to the JDK on your server.

Amazon Corretto (OpenJDK) 11

See the following documentation from Amazon for instructions:

Amazon Corretto 11 Installation Instructions for Debian-Based, RPM-Based and Alpine Linux Distributions

OpenJDK 11

  1. Open a terminal.

  2. Execute the following command:

    sudo apt remove openjdk-11-jdk