# Can't uninstall Elastic Endpoint on macOS

**URL:** <https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986>\
**Category:** Endpoint Security\
**Created:** [May 25, 2021, 7:20pm UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986 "2021-05-25T19:20:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josh_a/32/42035_2.png) [@Josh\_A](https://discuss.elastic.co/u/Josh_A)\
**Post date:** [May 25, 2021, 7:20pm UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/1 "2021-05-25T19:20:35Z")

</div>

Hi - the macOS agent is a huge CPU and RAM hog on macOS 11.2.3.

I'm trying to uninstall following these instructions:

> **[Uninstall Elastic Agent | Fleet User Guide \[7.13\] | Elastic](https://www.elastic.co/guide/en/fleet/current/uninstall-elastic-agent.html)**

When I browse to the folder where the endpoint is installed (/Library/Elastic/Endpoint/), I get the following error when I run "sudo elastic-agent uninstall":

sudo: elastic-agent: command not found

I also tried running "sudo elastic-endpoint uninstall" and got the following error:

sudo elastic-endpoint uninstall

I've also tried deleting the Elastic app from Applications. However, the app keeps restarting even after I Force Quit.

How can I remove this agent?

---

<div class="post-metadata">

**Author:** ![ckim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ckim/32/78869_2.png) [@ckim](https://discuss.elastic.co/u/ckim)\
**Post date:** [May 26, 2021, 2:42pm UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/2 "2021-05-26T14:42:24Z")

</div>

Hi Josh\_A,

Are you having problems with elastic-agent? or elastic-endpoint?

For elastic-agent, it is strange to see that the system couldn't find elastic-agent command. It's normally installed under `/usr/local/bin/elastic-agent`. If you type following command on terminal, it will show if the command is available.

`ls -l /usr/local/bin/elastic-agent`

If it is available, to remove the agent, you need to browse to the folder, `/Library/Elastic/Agent`, and then run `sudo /usr/local/bin/elastic-agent uninstall`.

If you are having problem with elastic-endpoint and would like to remove it, you need to either remove the security integration or assign a new policy without security integration from Kibana.

Let me know if your concerns is with elastic-agent or elastic-endpoint.

If you don't mind though, we would like to get some insight on your observation on high system resource utilization. Can you share the output of the tool you used to measure the usage of memory and CPU?

---

<div class="post-metadata">

**Author:** ![Josh\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josh_a/32/42035_2.png) [@Josh\_A](https://discuss.elastic.co/u/Josh_A)\
**Post date:** [May 26, 2021, 10:04pm UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/3 "2021-05-26T22:04:28Z")

</div>

Hi Chan,

I was having problems with elastic-endpoint, but could only find instructions to uninstall elastic-agent. I contacted Elastic support, and they also seemed confused by this.

Here are the instructions that they gave me to remove elastic-endpoint that actually ended up working:  
cd /tmp  
cp /Library/Elastic/Endpoint/elastic-endpoint elastic-endpoint  
sudo ./elastic-endpoint uninstall  
rm elastic-endpoint

![Sent from Front](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b80b11203d97fe01c5597ca3be70406ea48f5709.gif)

---

<div class="post-metadata">

**Author:** ![ckim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ckim/32/78869_2.png) [@ckim](https://discuss.elastic.co/u/ckim)\
**Post date:** [May 26, 2021, 11:10pm UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/4 "2021-05-26T23:10:45Z")

</div>

Hi Josh,

Great to hear that you were able to get elastic-endpoint uninstalled.

I would really appreciate it if you could share your observation on the performance. It would further help us to make improvement in the future so that you don't run into the same problem.

---

<div class="post-metadata">

**Author:** ![Josh\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josh_a/32/42035_2.png) [@Josh\_A](https://discuss.elastic.co/u/Josh_A)\
**Post date:** [May 27, 2021, 12:06pm UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/5 "2021-05-27T12:06:25Z")

</div>

Hi Chan - I didn't capture any screenshots, but my observation is that my computer was often sluggish, and when I'd check Activity Monitor, Elastic Endpoint was always using gigabytes of memory and over 100% of CPU. When I'd kill the process, the computer would stop being sluggish, though the process would automatically restart. I'd have to do this every day or two.

![Sent from Front](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b80b11203d97fe01c5597ca3be70406ea48f5709.gif)

---

<div class="post-metadata">

**Author:** ![ckim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ckim/32/78869_2.png) [@ckim](https://discuss.elastic.co/u/ckim)\
**Post date:** [May 27, 2021, 2:56pm UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/6 "2021-05-27T14:56:50Z")

</div>

I'm sorry that you had the issue. If you are willing to install the endpoint again briefly to help us diagnose the cause, we would love to work with you on that. Let me know if you are okay with the idea.

---

<div class="post-metadata">

**Author:** ![Josh\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josh_a/32/42035_2.png) [@Josh\_A](https://discuss.elastic.co/u/Josh_A)\
**Post date:** [May 27, 2021, 3:13pm UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/7 "2021-05-27T15:13:34Z")

</div>

Hi Chan - I'll need to pass, sorry.

![Sent from Front](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b80b11203d97fe01c5597ca3be70406ea48f5709.gif)

---

<div class="post-metadata">

**Author:** ![lesio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lesio/32/89323_2.png) [@lesio](https://discuss.elastic.co/u/lesio)\
**Post date:** [May 28, 2021, 9:57am UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/8 "2021-05-28T09:57:46Z")

</div>

Hi Josh\_A,

It could be also very helpful to have a general idea what's your environment in case it would be hard to reproduce the problem.

I would be nice if you could drop a line about what do you do on your macOS. Is it a typical office-workload without any specific apps, just the browser. Do you do software development, having many toolchains, etc. Is your mac Intel based or M1?

---

<div class="post-metadata">

**Author:** ![Josh\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josh_a/32/42035_2.png) [@Josh\_A](https://discuss.elastic.co/u/Josh_A)\
**Post date:** [May 28, 2021, 10:30am UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/9 "2021-05-28T10:30:14Z")

</div>

Sure! How can I reach you directly to share more detailed info?

![Sent from Front](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b80b11203d97fe01c5597ca3be70406ea48f5709.gif)

---

<div class="post-metadata">

**Author:** ![lesio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lesio/32/89323_2.png) [@lesio](https://discuss.elastic.co/u/lesio)\
**Post date:** [May 28, 2021, 11:16am UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/10 "2021-05-28T11:16:57Z")

</div>

Hi, I guess you don't want to leave the information on a publicly visible page. In such case you can just click on my profile and message me directly, or is it not available for every user on this forum?

---

<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 25, 2021, 11:17am UTC](https://discuss.elastic.co/t/cant-uninstall-elastic-endpoint-on-macos/273986/11 "2021-06-25T11:17:30Z")

</div>

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