🚀 Master Java & AWS!
Subscribe to Ram N Java for simplified, high-quality tech tutorials!
YES, I WANT TO SUBSCRIBEHow to Uninstall JDK 11 on Linux or Amazon EC2
Cleaning up your development environment is just as important as setting it up! If you need to remove JDK 11 from your Linux machine or Amazon EC2 instance to make room for a newer version, this guide will walk you through the process step-by-step using simple terminal commands.
Step 1: Check Currently Installed Java Versions
Before you start deleting, it's a good idea to see exactly what you have installed. Run the following command in your terminal:
This will list all Java paths. Take note of the path where JDK 11 is installed (e.g., /usr/lib/jvm/java-11-amazon-corretto).
Step 2: Uninstall Using the Package Manager
If you installed Java using a package manager like yum (common on Amazon Linux/CentOS) or apt (Ubuntu), you can remove it easily:
- For Amazon Linux/CentOS:
sudo yum remove java-11-amazon-corretto-devel - For Ubuntu/Debian:
sudo apt-get remove openjdk-11-jdk
Step 3: Clean Up Environment Variables
If you manually set up your JAVA_HOME path, you must remove it to avoid errors. Open your profile file:
Find the lines related to JDK 11, delete them, and save. Then, reload the file:
Step 4: Verify the Removal
Confirm that JDK 11 is gone by running the version check command:
If it was your only version, the system will tell you the command is not found. If you have other versions, it will show the next active one.
💡 Need Resources?
Don't forget that I share the PowerPoint presentation and source code for all my tutorials! You can find the download links in the YouTube video description above.
Great Information Provided Thanks For The Information !
ReplyDeleteAWS online course in hyderabad
ReplyDeleteThis blog post is incredibly useful and instructive. I want to thank you for sharing this information. I also have a website with a lot of useful information.
Best java Training institutes in hyderabad
This blog post is incredibly useful and instructive. I want to thank you for sharing this information. I also have a website with a lot of useful information.
ReplyDeleteCyber security training institue in hyderabad
This blog post is incredibly useful and instructive. I want to thank you for sharing this information. I also have a website with a lot of useful information.
ReplyDeleteCyber security training institue in hyderabad
nice blog and wonderfull information
ReplyDeletepower bi training in hyderabad
Thank you for sharing this information,its is very helpful to all
ReplyDeleteclick here for more information