# Delete the old data from index

**URL:** <https://discuss.elastic.co/t/delete-the-old-data-from-index/156312>\
**Category:** Elasticsearch\
**Created:** [November 12, 2018, 3:37pm UTC](https://discuss.elastic.co/t/delete-the-old-data-from-index/156312 "2018-11-12T15:37:43Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 28, 2018, 12:50pm UTC](https://discuss.elastic.co/t/delete-the-old-data-from-index/156312/21 "2018-11-28T12:50:32Z")

</div>

This suggests that `curator` was not installed to the path for the `root` user. What is the output of

```auto
env | grep PATH

```

and

```auto
ls /usr/local/bin/curator

```

---

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [November 28, 2018, 1:14pm UTC](https://discuss.elastic.co/t/delete-the-old-data-from-index/156312/22 "2018-11-28T13:14:33Z")

</div>

Now i'm getting this error,

```
[root@lpdosput020008 ~]# curator --dry-run /root/curator.yml
Traceback (most recent call last):
  File "/bin/curator", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2837, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 449, in _build_master
    ws.require( __requires__ )
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 742, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 639, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: jmespath>=0.7.1,<1.0.0
```

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 28, 2018, 1:57pm UTC](https://discuss.elastic.co/t/delete-the-old-data-from-index/156312/23 "2018-11-28T13:57:45Z")

</div>

What OS is this? What version of Python?

Older versions of Python included with some operating systems will not be fully supported as the bundled dependencies are out of date (as displayed in your output).

Python 2.7.10 or greater _should_ be sufficient. Anything older is hit and miss.

If the server has Python3, that would be better. Install using `pip3` if that is the case.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 28, 2018, 2:03pm UTC](https://discuss.elastic.co/t/delete-the-old-data-from-index/156312/24 "2018-11-28T14:03:10Z")

</div>

You can also attempt to address this by finding a `jmespath` version within the constraints provided, and install like the other Curator dependencies, e.g.

```auto
pip install jmespath-x.y.z.tar.gz

```

As this is a raft of other dependencies, there may be others that are missing as well.

Are you sure you can’t just install the Curator [RPM](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.6/yum-repository.html#_direct_package_download_link_2) or [DEB](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.6/apt-repository.html#_direct_package_download_link) package manually? You clearly have root access, and those packages have all of the necessities bundled. You wouldn’t need external access. Just copy the necessary file across and install with the package manager as needed.

If you do go this route, though, you should uninstall the pip-based Curator installation first:

```auto
pip uninstall elasticsearch-curator

```

---

<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:** [December 26, 2018, 2:03pm UTC](https://discuss.elastic.co/t/delete-the-old-data-from-index/156312/25 "2018-12-26T14:03:11Z")

</div>

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

[Previous page](https://discuss.elastic.co/t/delete-the-old-data-from-index/156312.md?page=1)
