# Elasticsearch 9.x Upgrade (Linux)

This article outlines the steps to upgrade Elasticsearch to version 9 in a Linux environment. The process includes verifying the current installation, removing the existing version, and installing the updated version using automated scripts. Following these steps ensures a consistent and controlled upgrade process.

## Prerequisites

* Ensure the Java upgrade process on the Linux machine is completed.
* Confirm access to the server with the required permissions to execute shell scripts.
* Ensure network access to download scripts from the provided URLs.
* Verify that Elasticsearch credentials are available for post-installation validation.

## Steps Involved

### Verify Existing Elasticsearch Version

* Run the following command to check the currently installed Elasticsearch version:

  ```
  curl -XGET -u elastic:0valEdge! http://localhost:9200 
  ```
* Review the response to confirm the existing version.\
  \
  Sample Reference Screenshot:

  <figure><img src="/files/WZWCMpjH0d3CNzvSorSl" alt=""><figcaption></figcaption></figure>

### Uninstall Existing Elasticsearch

* Download and execute the uninstall script:

  ```
  wget https://ovaledge.s3.us-west-1.amazonaws.com/scripts/8x_automation/remove_elasticsearch.sh
  sh remove_elasticsearch.sh
  ```

  \
  Sample Reference Screenshot:

  <figure><img src="/files/quOX0OBTYhDBntlOTIAY" alt=""><figcaption></figcaption></figure>
* Ensure the script completes successfully before proceeding.

### Install Elasticsearch Version 9

* Download and execute the installation script:

  ```
  wget https://ovaledge.s3.us-west-1.amazonaws.com/scripts/8x_automation/install_es.sh
  sh install_es.sh
  ```

  \
  Sample Reference Screenshot:

  <figure><img src="/files/IVlujd6yyxUNnAQXcklk" alt=""><figcaption></figcaption></figure>
* Wait for the installation process to complete.

### Validate Elasticsearch Installation

* Run the following command to verify the upgraded version:

  ```
  curl -XGET -u elastic:0valEdge! http://localhost:9200
  ```
* Confirm that the response reflects Elasticsearch version 9.

***

Copyright © 2026, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/release8.1/deployment-and-maintenance/upgrade/elasticsearch-9.x-upgrade-linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
