Stop elasticsearch from updating automatically

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 stable main in /etc/apt/sources.list.d/elastic-1.x.list but still it updates. Any pointer would be great.

Regards,
Neville

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

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

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