# Cleanup after windows .msi installation

**URL:** <https://discuss.elastic.co/t/cleanup-after-windows-msi-installation/229791>\
**Category:** Elasticsearch\
**Created:** [April 25, 2020, 8:40pm UTC](https://discuss.elastic.co/t/cleanup-after-windows-msi-installation/229791 "2020-04-25T20:40:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![glushkov](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@glushkov](https://discuss.elastic.co/u/glushkov)\
**Post date:** [April 25, 2020, 8:40pm UTC](https://discuss.elastic.co/t/cleanup-after-windows-msi-installation/229791/1 "2020-04-25T20:40:02Z")

</div>

Dear experts,  
I had installed ES 7.6.0 via the .msi package. I have removed it using "Add/remove programs". Now I am left with all setting left in `C:\ProgramData\Elastic\Elasticsearch` and two dynamic environmental variables set:

```auto
ES_HOME=C:\Program Files\Elastic\Elasticsearch\7.6.0\
ES_PATH_CONF=C:\ProgramData\Elastic\Elasticsearch\config

```

So now every time when I want to start a new node I have to do:

```auto
set ES_HOME=
set ES_PATH_CONF=
bin\elasticsearch.bat

```

Any idea why the msi uninstallation package left this mess after itself? How can I find out where these variables are currently being set so I can remove it?

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [April 26, 2020, 11:51pm UTC](https://discuss.elastic.co/t/cleanup-after-windows-msi-installation/229791/3 "2020-04-26T23:51:15Z")

</div>

> [@glushkov](#):
>
> Now I am left with all setting left in `C:\ProgramData\Elastic\Elasticsearch`

Uninstallation of the MSI leaves data, config and logs directories in ProgramData. If you're happy to lose this data, then you can delete the `C:\ProgramData\Elastic\Elasticsearch`directory.

> [@glushkov](#):
>
> and two dynamic environmental variables set:
> 
> ```auto
> ES_HOME=C:\Program Files\Elastic\Elasticsearch\7.6.0\ 
> ES_PATH_CONF=C:\ProgramData\Elastic\Elasticsearch\config
> 
> ```

This shouldn't be the case, the MSI is configured to remove those two environment variables on uninstall:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/7/47dc3f63199ca73cfff757558887be50bb1c2b23.png)

[See Environment table documentation](https://docs.microsoft.com/en-us/windows/win32/msi/environment-table#columns). Since they are system environment variables, their removal may not be reflected in existing console/terminal processes without refeshing the environment variables, but they should not exist if checked in a new console/terminal.

---

<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:** [May 24, 2020, 11:51pm UTC](https://discuss.elastic.co/t/cleanup-after-windows-msi-installation/229791/4 "2020-05-24T23:51:31Z")

</div>

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