# Unable to install X-Pack

**URL:** <https://discuss.elastic.co/t/unable-to-install-x-pack/56236>\
**Category:** Elasticsearch\
**Created:** [July 24, 2016, 10:54am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack/56236 "2016-07-24T10:54:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gupta.yuvraj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gupta.yuvraj/32/7550_2.png) [@gupta.yuvraj](https://discuss.elastic.co/u/gupta.yuvraj)\
**Post date:** [July 24, 2016, 10:54am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack/56236/1 "2016-07-24T10:54:51Z")

</div>

I am unable to install X-Pack. Initially, I ran the command to remove x-pack without being the super-user for which it gave the following error:-

```
-> Removing x-pack...
Exception in thread "main" java.io.IOException: Could not remove the following files (in the order of attempts):
   /home/yuvraj/Downloads/ElasticStack5.0/Alpha4/elasticsearch-5.0.0-alpha4/bin/x-pack/syskeygen: java.nio.file.AccessDeniedException: /home/yuvraj/Downloads/ElasticStack5.0/Alpha4/elasticsearch-5.0.0-alpha4/bin/x-pack/syskeygen
   /home/yuvraj/Downloads/ElasticStack5.0/Alpha4/elasticsearch-5.0.0-alpha4/bin/x-pack/croneval: java.nio.file.AccessDeniedException: /home/yuvraj/Downloads/ElasticStack5.0/Alpha4/elasticsearch-5.0.0-alpha4/bin/x-pack/croneval

at org.apache.lucene.util.IOUtils.rm(IOUtils.java:323)
at org.elasticsearch.plugins.RemovePluginCommand.execute(RemovePluginCommand.java:93)
at org.elasticsearch.plugins.RemovePluginCommand.execute(RemovePluginCommand.java:63)
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:91)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:91)
at org.elasticsearch.cli.Command.main(Command.java:53)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:61)

```

Then after running the following query:-  
sudo bin/elasticsearch-plugin remove x-pack

It gives the following error:

> [sudo] password for yuvraj:  
> **-\> Removing x-pack...**  
> A tool for managing installed elasticsearch plugins

> ## Commands
> 
> list - Lists installed elasticsearch plugins  
> install - Install a plugin  
> remove - Removes a plugin from elasticsearch

> Non-option arguments:  
> command

> Option Description
> 
> * * *
> 
> -h, --help show help  
> -s, --silent show minimal output  
> -v, --verbose show verbose output  
> **ERROR: plugin x-pack not found; run 'elasticsearch-plugin list' to get list of installed plugins**

After running the command as mentioned i.e. bin/elasticsearch-plugin list, it shows as below:-

> **bin/elasticsearch-plugin list**  
> **.removing-x-pack**

I am unsure whether X-Pack has been uninstalled or not?

However, I am not seeing such behaviour in Kibana for X-Pack Uninstallation. Uninstalling X-Pack on Kibana without being the super-user:-

> bin/kibana-plugin remove x-pack  
> Removing x-pack...  
> Unable to remove plugin because of error: "EACCES: permission denied, unlink '/home/yuvraj/Downloads/ElasticStack5.0/Alpha4/kibana-5.0.0-alpha4-linux-x64/installedPlugins/x-pack/.node-version'"

```
bin/kibana-plugin list
x-pack@5.0.0-alpha4-SNAPSHOT

```

> sudo bin/kibana-plugin remove x-pack  
> Removing x-pack...

---

<div class="post-metadata">

**Author:** ![bohyun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bohyun/32/10087_2.png) [@bohyun](https://discuss.elastic.co/u/bohyun)\
**Post date:** [July 30, 2016, 3:09pm UTC](https://discuss.elastic.co/t/unable-to-install-x-pack/56236/2 "2016-07-30T15:09:08Z")

</div>

Hi Yuvraj,

Thanks for trying out 5.0 alpha 4.

In order to verify if X-Pack has been properly uninstalled, simply navigate to the file directory under where your Elasticsearch 5.0 alpha 4 installed and go into /plugins directory. If you don't see /x-pack directory inside the /plugins directory, then you have successfully uninstalled X-Pack.

In other words,

`your_home_directory/elasticsearch-5.0.0-alpha4/plugins/`  
(no xpack directory when uninstalled)  
`your_home_directory/elasticsearch-5.0.0-alpha4/plugins/xpack` (when installed)

Hope this helps,  
Bohyun

---

<div class="post-metadata">

**Author:** ![gupta.yuvraj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gupta.yuvraj/32/7550_2.png) [@gupta.yuvraj](https://discuss.elastic.co/u/gupta.yuvraj)\
**Post date:** [August 1, 2016, 3:59am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack/56236/3 "2016-08-01T03:59:24Z")

</div>

Thanks for the reply.

Can we change the behaviour when a user tries to remove X-Pack without having root privileges to throw an error stating "Kindly login with root privileges to remove X-Pack".

It will help the user to understand easily.

Without having root privileges and removing X-Pack gives an error and at the same time there is no xpack directory which indicates X-Pack may have been removed is quite misleading to the user.

---

<div class="post-metadata">

**Author:** ![bohyun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bohyun/32/10087_2.png) [@bohyun](https://discuss.elastic.co/u/bohyun)\
**Post date:** [August 2, 2016, 4:01am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack/56236/4 "2016-08-02T04:01:56Z")

</div>

Hi Yuvraj -

Thanks for your feedback. We've created an issue to improve the error and log messages when uninstalling X-Pack.

Cheers,  
Bohyun

---

<div class="post-metadata">

**Author:** ![gupta.yuvraj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gupta.yuvraj/32/7550_2.png) [@gupta.yuvraj](https://discuss.elastic.co/u/gupta.yuvraj)\
**Post date:** [August 13, 2016, 5:52pm UTC](https://discuss.elastic.co/t/unable-to-install-x-pack/56236/5 "2016-08-13T17:52:43Z")

</div>

Thanks for the acknowledgement.

Can you please send me the ticket link so that I am aware of this change.

Thanks,  
Yuvraj

---

<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:** [July 6, 2017, 1:40pm UTC](https://discuss.elastic.co/t/unable-to-install-x-pack/56236/6 "2017-07-06T13:40:30Z")

</div>


