# Older versions not available in apt repository

**URL:** <https://discuss.elastic.co/t/older-versions-not-available-in-apt-repository/68489>\
**Category:** Elasticsearch\
**Created:** [December 8, 2016, 10:00pm UTC](https://discuss.elastic.co/t/older-versions-not-available-in-apt-repository/68489 "2016-12-08T22:00:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveops](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daveops/32/13760_2.png) [@daveops](https://discuss.elastic.co/u/daveops)\
**Post date:** [December 8, 2016, 10:00pm UTC](https://discuss.elastic.co/t/older-versions-not-available-in-apt-repository/68489/1 "2016-12-08T22:00:02Z")

</div>

With the release of 5.1.1 today, I found that the 5.0.2 packages are no longer available in the apt repositories. This has broken my builds because I'm pinning versions and it now fails to pull the version I have specified.

```auto
root@infra-es-client-dd45f945:~# tail -1 /etc/apt/sources.list
deb https://artifacts.elastic.co/packages/5.x/apt stable main
root@infra-es-client-dd45f945:~# apt install elasticsearch=5.0.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '5.0.2' for 'elasticsearch' was not found

```

Attempting to install the new version works fine:

```auto
root@infra-es-client-dd45f945:~# apt install elasticsearch=5.1.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  elasticsearch
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B/33.2 MB of archives.
After this operation, 36.9 MB of additional disk space will be used.
Selecting previously unselected package elasticsearch.
(Reading database ... 84103 files and directories currently installed.)
Preparing to unpack .../elasticsearch_5.1.1_all.deb ...
Unpacking elasticsearch (5.1.1) ...
Processing triggers for systemd (229-4ubuntu12) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up elasticsearch (5.1.1) ...

```

Is this expected behavior? It seems excessive to remove older versions from the repos the day a new version is released.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 8, 2016, 10:19pm UTC](https://discuss.elastic.co/t/older-versions-not-available-in-apt-repository/68489/2 "2016-12-08T22:19:16Z")

</div>

Weird, I can see 5.0.2 and 5.1.1 in `apt-cache show elasticsearch`.

---

<div class="post-metadata">

**Author:** ![daveops](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daveops/32/13760_2.png) [@daveops](https://discuss.elastic.co/u/daveops)\
**Post date:** [December 8, 2016, 10:21pm UTC](https://discuss.elastic.co/t/older-versions-not-available-in-apt-repository/68489/3 "2016-12-08T22:21:54Z")

</div>

Is that from your local cache though? All I see is two versions (one being the default Ubuntu Xenial package):

```auto
root@infra-es-client-dd45f945:~# apt-cache show elasticsearch
Package: elasticsearch
Source: elasticsearch
Version: 5.1.1
Architecture: all
Depends: libc6, adduser, bash
Installed-Size: 36010
Maintainer: Elasticsearch Team <info@elastic.co>
Priority: optional
Section: web
Filename: pool/main/e/elasticsearch/elasticsearch_5.1.1_all.deb
Size: 33175584
SHA256: c8a38990a24b558fb9c65492034caa00044e638d0ede6d440b00cb4eacb46d1d
SHA1: f2fdf6d2bdd6e526c5be53f859c4dd111677a4b6
MD5sum: 46f6064685f449237aad96a2ede83f28
Description: Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch: The Definitive Guide' book can be found at https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
 Elasticsearch subproject :distribution:deb
Description-md5: 36b2f02695284f9e5f9b45679912c304
Homepage: https://www.elastic.co/

Package: elasticsearch
Priority: optional
Section: universe/web
Installed-Size: 73
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Architecture: all
Version: 1.7.3+dfsg-3
Depends: adduser, default-jre-headless | java6-runtime-headless, libelasticsearch1.7-java, java-wrappers
Filename: pool/universe/e/elasticsearch/elasticsearch_1.7.3+dfsg-3_all.deb
Size: 17248
MD5sum: 75a29ca42c2014ca1dbd4dc4d958011f
SHA1: 2979385342fef111595686ae27adfe6721ddab64
SHA256: 52f782c2ddf1814fbc708856e15b74a91b7c59c0630639a7b63ae1e67a29aa0a
Description-en: Open Source, Distributed, RESTful Search Engine
 Elasticsearch is a search server based on Lucene. It provides a
 distributed, multitenant-capable full-text search engine with a
 RESTful web interface and schema-free JSON documents.
 .
 This package contains the infrastructure needed to an ElasticSearch node.
Description-md5: dae3f74da91aa809c7b74dae0ccaab14
Homepage: http://www.elasticsearch.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 8, 2016, 10:28pm UTC](https://discuss.elastic.co/t/older-versions-not-available-in-apt-repository/68489/4 "2016-12-08T22:28:11Z")

</div>

Yeah you are correct. I'll ask internally.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 8, 2016, 11:20pm UTC](https://discuss.elastic.co/t/older-versions-not-available-in-apt-repository/68489/5 "2016-12-08T23:20:15Z")

</div>

I've raised this here - [https://github.com/elastic/elasticsearch/issues/22063](https://github.com/elastic/elasticsearch/issues/22063)

---

<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:** [January 5, 2017, 11:20pm UTC](https://discuss.elastic.co/t/older-versions-not-available-in-apt-repository/68489/6 "2017-01-05T23:20:23Z")

</div>

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