@georgiana.senger
To uninstall Java on Ubuntu, follow these steps:
1
|
java -version |
If Java is installed, you will see the version number of the Java installation. If you don't see any output, then Java is not installed on your system.
1
|
sudo apt-get remove openjdk-11-jre-headless |
This command will remove the Java runtime environment (JRE) from your system, but it will not remove the Java Development Kit (JDK) if you have it installed.
1
|
sudo apt-get purge openjdk*
|
This command will remove all Java-related packages from your system.
1
|
java -version |
If Java is no longer installed, you will see an error message that says "command not found."