# Stop elasticsearch from updating automatically

**URL:** <https://discuss.elastic.co/t/stop-elasticsearch-from-updating-automatically/128331>\
**Category:** Elasticsearch\
**Created:** [April 17, 2018, 9:46am UTC](https://discuss.elastic.co/t/stop-elasticsearch-from-updating-automatically/128331 "2018-04-17T09:46:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nevilleonline](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nevilleonline](https://discuss.elastic.co/u/nevilleonline)\
**Post date:** [April 17, 2018, 9:46am UTC](https://discuss.elastic.co/t/stop-elasticsearch-from-updating-automatically/128331/1 "2018-04-17T09:46:00Z")

</div>

Hi ,

I am having a weird problem. My elasticsearch is getting updated every night from 1.5.2 to 1.7.3 in my azure VM. Can you help me stop this. I need to make it work with 1.5.2 for application compatibility.

This is how I installed it on the azure ubuntu 16.04 vm

```
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/1.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-1.x.list

sudo apt update 
sudo apt install elasticsearch=1.5.2

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo /bin/systemctl start elasticsearch.service

```

I commented out the deb [https://artifacts.elastic.co/packages/1.x/apt](https://artifacts.elastic.co/packages/1.x/apt) stable main in /etc/apt/sources.list.d/elastic-1.x.list but still it updates. Any pointer would be great.

Regards,  
Neville

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [April 17, 2018, 10:09am UTC](https://discuss.elastic.co/t/stop-elasticsearch-from-updating-automatically/128331/2 "2018-04-17T10:09:35Z")

</div>

You could PIN the version in apt.  
[https://help.ubuntu.com/community/PinningHowto](https://help.ubuntu.com/community/PinningHowto)

---

<div class="post-metadata">

**Author:** ![nevilleonline](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nevilleonline](https://discuss.elastic.co/u/nevilleonline)\
**Post date:** [April 18, 2018, 8:47am UTC](https://discuss.elastic.co/t/stop-elasticsearch-from-updating-automatically/128331/3 "2018-04-18T08:47:42Z")

</div>

Thanks A\_B

That worked. I put a hold using the below command and version remained the same.

`echo "elasticsearch hold" | sudo dpkg --set-selections`

---

<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:** [May 16, 2018, 8:59am UTC](https://discuss.elastic.co/t/stop-elasticsearch-from-updating-automatically/128331/4 "2018-05-16T08:59:19Z")

</div>

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