# /etc/init.d/elasticsearch: No such file or directory

**URL:** <https://discuss.elastic.co/t/etc-init-d-elasticsearch-no-such-file-or-directory/238908>\
**Category:** Elasticsearch\
**Created:** [June 26, 2020, 7:16pm UTC](https://discuss.elastic.co/t/etc-init-d-elasticsearch-no-such-file-or-directory/238908 "2020-06-26T19:16:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akira\_Kise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akira_kise/32/71206_2.png) [@Akira\_Kise](https://discuss.elastic.co/u/Akira_Kise)\
**Post date:** [June 26, 2020, 7:16pm UTC](https://discuss.elastic.co/t/etc-init-d-elasticsearch-no-such-file-or-directory/238908/1 "2020-06-26T19:16:10Z")

</div>

Please help! I'm so desperate in getting help because I don't know what else to do.

I'm working on a server that already had elasticsearch installed. But then I downloaded an elasticsearch package with this command:  
 wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.1/elasticsearch-2.3.1.deb sudo dpkg -i elasticsearch-2.3.1.deb  
It gave me a warning that that would downgrade the previous installed elasticsearch. So I stopped there.

After that, apparently I querried too much data and the service shut down. I input this command to start the service again:  
 /etc/init.d/elasticsearch start But it failed to start. It said that it exit with code error. I thought that maybe I should remove the package that I installed before. I tried to remove the elasticsearch-2.3.1.deb package with this command: sudo dpkg -r (dpkg-deb -f elasticsearch-2.3.1.deb Package) sudo dpkg -P (dpkg-deb -f elasticsearch-2.3.1.deb Package) I don't know why, but when I typed ls  
the package elasticsearch-2.3.1.deb was still there.

So I tried inputting this command:  
$ apt remove elasticsearch-2.3.1.deb  
And the following picture was what appeared after that:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/c/fcc0b98a758743906f4b295758549d9a22606fb3.png)

I tried to start the service again:  
$ /etc/init.d/elasticsearch start  
But then this appeared:  
 ![elasticsearch2](https://us1.discourse-cdn.com/elastic/original/3X/6/3/6319088b123de88c0a24d1e799fc86879282e49a.png)

But when I put the command:  
$ locate elasticsearch  
the folder was there...

 ![elasticsearch3](https://us1.discourse-cdn.com/elastic/original/3X/7/b/7b30fee96dec8aa6e03a397621cc17333bd76ebf.png) ![elasticsearch4](https://us1.discourse-cdn.com/elastic/original/3X/b/5/b5c49a64db134cfc0445428f1f80b6c586a0498d.png) ![elasticsearch5](https://us1.discourse-cdn.com/elastic/original/3X/0/3/035f9d8b7e7f35c55dcf1e1d262be3d2ae5984a5.png) ![elasticsearch6](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1c8b51c76638077d66e159096d23e5458389c032.png) ![elasticsearch7](https://us1.discourse-cdn.com/elastic/original/3X/4/2/42e0196fe5b6da5c254eae2053b7e25408a5f59a.png) ![elasticsearch8](https://us1.discourse-cdn.com/elastic/original/3X/6/5/65a91577de94a055812149567852b8fead97719d.png)

I also tried this command:  
$ service elasticsearch status  
But the result was this:

 ![elasticsearch9](https://us1.discourse-cdn.com/elastic/original/3X/9/3/93c6beafb145773649796bdb53cfe2dde0911f86.png)

How do I solve this? How can I make the first installed version of elasticsearch work (not the elasticsearch-2.3.1.deb)?

Need help as soon as possible. Your help will be very appreciated. Thank you :')

---

<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 24, 2020, 7:16pm UTC](https://discuss.elastic.co/t/etc-init-d-elasticsearch-no-such-file-or-directory/238908/2 "2020-07-24T19:16:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
