# How to completely uninstall elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-to-completely-uninstall-elasticsearch/35832>\
**Category:** Elasticsearch\
**Created:** [November 29, 2015, 2:19pm UTC](https://discuss.elastic.co/t/how-to-completely-uninstall-elasticsearch/35832 "2015-11-29T14:19:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Connor0308](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Connor0308](https://discuss.elastic.co/u/Connor0308)\
**Post date:** [November 29, 2015, 2:19pm UTC](https://discuss.elastic.co/t/how-to-completely-uninstall-elasticsearch/35832/1 "2015-11-29T14:19:27Z")

</div>

I am trying to get the ELK stack installed on a CentOS 6.X VPS including WHM.  
As I needed to start again from scratch, I uninstalled the elasticsearch using the package manager.  
After doing so, my expectation would have been that a

`curl -XGET 'http://localhost:9200/'`

wouldn't give any feedback.  
But here, I receive

```
{
  "status" : 200,
  "name" : "Abigail Brand",
  "cluster_name" : "elasticsearch",
  "version" : {
"number" : "1.4.0",
"build_hash" : "bc94bd81298f81c656893ab1ddddd30a99356066",
"build_timestamp" : "2014-11-05T14:26:12Z",
"build_snapshot" : false,
"lucene_version" : "4.10.2"
  },
  "tagline" : "You Know, for Search"
}

```

Trying to remove the package again and to clean the package mangers cache doesn't do the trick.  
Any suggestions on how to proceed?  
Thank you in advance,  
br,

Connor.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 29, 2015, 7:32pm UTC](https://discuss.elastic.co/t/how-to-completely-uninstall-elasticsearch/35832/2 "2015-11-29T19:32:50Z")

</div>

You apparently have an ES process running. Use e.g. `ps aux` to locate it and see from where it was started, which directories it might be using and, obviously, its pid so that you can kill it.

---

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [November 29, 2015, 8:19pm UTC](https://discuss.elastic.co/t/how-to-completely-uninstall-elasticsearch/35832/3 "2015-11-29T20:19:05Z")

</div>

Find where is elasticsearch:

find / --name "elasticsearch"

Then remove the folders. Also, remove service script at

/etc/init.d/elasticsearch

It's just java files, no magic (almost).

---

<div class="post-metadata">

**Author:** ![Connor0308](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Connor0308](https://discuss.elastic.co/u/Connor0308)\
**Post date:** [November 30, 2015, 8:07pm UTC](https://discuss.elastic.co/t/how-to-completely-uninstall-elasticsearch/35832/4 "2015-11-30T20:07:30Z")

</div>

That was nearly to easy - thank you for that!  
Thank you for your help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:34pm UTC](https://discuss.elastic.co/t/how-to-completely-uninstall-elasticsearch/35832/5 "2017-07-05T23:34:44Z")

</div>


