# How to disable all x-pack features in elasticsearch source code

**URL:** <https://discuss.elastic.co/t/how-to-disable-all-x-pack-features-in-elasticsearch-source-code/168935>\
**Category:** Elasticsearch\
**Created:** [February 19, 2019, 6:16am UTC](https://discuss.elastic.co/t/how-to-disable-all-x-pack-features-in-elasticsearch-source-code/168935 "2019-02-19T06:16:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [February 19, 2019, 6:16am UTC](https://discuss.elastic.co/t/how-to-disable-all-x-pack-features-in-elasticsearch-source-code/168935/1 "2019-02-19T06:16:16Z")

</div>

I would want to disable all the x-pack features like ml,security,monitoring etc.. in the source code of elasticsearch.  
**I am using elasticsearch version 6.6.0.**  
Because elasticsearch opensource comes with xpack,i am having difficult time in disabling elasticsearch.  
any idea how to do it.

I tried commenting out the line,  
**addSubProjects('', new File(rootProject.projectDir, 'x-pack'))**  
in **settings.gradle** but it doesnt seem to work.

---

<div class="post-metadata">

**Author:** ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)\
**Post date:** [February 19, 2019, 6:41am UTC](https://discuss.elastic.co/t/how-to-disable-all-x-pack-features-in-elasticsearch-source-code/168935/2 "2019-02-19T06:41:51Z")

</div>

Hi @MKU,

You can use the current installation with x-pack features disabled.  
In case, in future, if you need to use x-pack features you would not need to install anything else and just enable the features that you want to use with an appropriate license. With the basic license, you get some additional features like Index lifecycle management, Data rollups etc. For comparison please see here [https://www.elastic.co/subscriptions](https://www.elastic.co/subscriptions)

In case you want an Apache 2.0 OSS distribution and you can download it here: [https://www.elastic.co/downloads/elasticsearch-oss](https://www.elastic.co/downloads/elasticsearch-oss)

Hope this helps.

Regards,  
Yogesh Gaikwad

---

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [February 19, 2019, 6:49am UTC](https://discuss.elastic.co/t/how-to-disable-all-x-pack-features-in-elasticsearch-source-code/168935/3 "2019-02-19T06:49:47Z")

</div>

Thank you for your reply [Yogesh\_Gaikwad](https://discuss.elastic.co/t/how-to-disable-all-x-pack-features-in-elasticsearch-source-code/168935/2).  
But I was looking for a way to disable xpack directly in source code not in the installation.

---

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [February 22, 2019, 5:20am UTC](https://discuss.elastic.co/t/how-to-disable-all-x-pack-features-in-elasticsearch-source-code/168935/4 "2019-02-22T05:20:34Z")

</div>

I was able to stop x-pack by commenting few lines in build.gradle .  
But i dont want to remove or comment any code.  
So is there any gradle command to exclude x-pack in compile time

---

<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:** [March 22, 2019, 5:20am UTC](https://discuss.elastic.co/t/how-to-disable-all-x-pack-features-in-elasticsearch-source-code/168935/5 "2019-03-22T05:20:37Z")

</div>

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