Amazon Corretto 25 Installation Instructions for Amazon Linux 2023
This topic describes how to install and uninstall Amazon Corretto 25 on a host or container running the Amazon Linux 2023 operating systems.
Download and Install RPMs Manually
-
Download RPMs from the Downloads page for your CPU architecture. To install the JDK, you will need to download the RPMs for both the JDK and the JRE.
-
Install using
yum localinstall
.sudo yum localinstall java-25-amazon-corretto*.rpm
Verify Your Installation
In the terminal, run the following command to verify the installation.
java -version
Expected output for 25.0.0:
openjdk 25 2025-09-16 OpenJDK Runtime Environment Corretto-25.0.0.36.1 (build 25+36-LTS) OpenJDK 64-Bit Server VM Corretto-25.0.0.36.1 (build 25+36-LTS, mixed mode, sharing)
If you see a version string that doesn't mention Corretto
,
run the following command to change the default java
or javac
providers.
sudo alternatives --config java
If using the JDK you should also run:
sudo alternatives --config javac
Uninstall Amazon Corretto 25
You can uninstall Amazon Corretto 25 with the following commands.
Uninstall headless:
sudo yum remove java-25-amazon-corretto-headless
Uninstall headful:
sudo yum remove java-25-amazon-corretto
Uninstall devel:
sudo yum remove java-25-amazon-corretto-devel
Uninstall jmods:
sudo yum remove java-25-amazon-corretto-jmods