# Elastic Agent is installed but currently broken: service exists but installation path is missing

**URL:** <https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610>\
**Category:** Kibana\
**Tags:** fleet\
**Created:** [May 29, 2023, 5:42pm UTC](https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610 "2023-05-29T17:42:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcos\_Ivan\_Robles\_H](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcos_ivan_robles_h/32/121557_2.png) [@Marcos\_Ivan\_Robles\_H](https://discuss.elastic.co/u/Marcos_Ivan_Robles_H)\
**Post date:** [May 29, 2023, 5:42pm UTC](https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610/1 "2023-05-29T17:42:58Z")

</div>

Hello

I am following this documentation:  
[Fleed Manager APM Sever](https://www.elastic.co/guide/en/apm/guide/8.8/_step_1_set_up_fleet.html)

I never saw the data in Kibana-Observability-APM so I tried to uninstall the elastic-agent from power shell and it did not let me so I deleted manually the folders folder from C:\ProgramFiles\Elastic\Agent and stop the service.

Now I try to install the elastic agent again and it gives me the following error:  
Elastic Agent is installed but currently broken: service exists but installation path is missing

Would anyone help me please?

---

<div class="post-metadata">

**Author:** ![MichelLaterman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michellaterman/32/110221_2.png) [@MichelLaterman](https://discuss.elastic.co/u/MichelLaterman)\
**Post date:** [May 29, 2023, 6:54pm UTC](https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610/2 "2023-05-29T18:54:28Z")

</div>

Hello @Marcos_Ivan_Robles_H,

That error message is due to the fact that you removed `C:\ProgramFiles\Elastic\Agent` manually without removing the associated service.

You should be able to force a re-install using the force: `-f` flag when re-running the install command.

Do you know what was the error was when you attempted to run the `elastic-agent uninstall` command?

---

<div class="post-metadata">

**Author:** ![Marcos\_Ivan\_Robles\_H](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcos_ivan_robles_h/32/121557_2.png) [@Marcos\_Ivan\_Robles\_H](https://discuss.elastic.co/u/Marcos_Ivan_Robles_H)\
**Post date:** [May 29, 2023, 11:53pm UTC](https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610/3 "2023-05-29T23:53:02Z")

</div>

Hi Michael

This is the error when I try to uninstall:

 ![WhatsApp Image 2023-05-29 at 17.50.12](https://us1.discourse-cdn.com/elastic/original/3X/9/0/905f00e35b412b982f5a0e4536618b7b715b4ec4.jpeg)

I don't understand. I am in the same path the error says.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 30, 2023, 12:25am UTC](https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610/4 "2023-05-30T00:25:49Z")

</div>

@Marcos_Ivan_Robles_H My suggestion..

as @MichelLaterman advised...Install the agent again / over again.

Then uninstall properly

---

<div class="post-metadata">

**Author:** ![MichelLaterman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michellaterman/32/110221_2.png) [@MichelLaterman](https://discuss.elastic.co/u/MichelLaterman)\
**Post date:** [May 30, 2023, 1:59am UTC](https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610/5 "2023-05-30T01:59:11Z")

</div>

If you give it the full path to the binary does it uninstall correctly?

---

<div class="post-metadata">

**Author:** ![Marcos\_Ivan\_Robles\_H](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcos_ivan_robles_h/32/121557_2.png) [@Marcos\_Ivan\_Robles\_H](https://discuss.elastic.co/u/Marcos_Ivan_Robles_H)\
**Post date:** [May 30, 2023, 6:18pm UTC](https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610/6 "2023-05-30T18:18:00Z")

</div>

Well I tried with the force parameter and it works.  
It throw some errors but I continue the process and I can see APM srvices now.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/3/83959bebb2f4f34f5738d3b2182af150d5308103.png)

Thank you! @MichelLaterman and @stephenb

---

<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:** [June 27, 2023, 6:18pm UTC](https://discuss.elastic.co/t/elastic-agent-is-installed-but-currently-broken-service-exists-but-installation-path-is-missing/334610/7 "2023-06-27T18:18:39Z")

</div>

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