# Elastic Agent Uninstall

**URL:** <https://discuss.elastic.co/t/elastic-agent-uninstall/382360>\
**Category:** Elastic Training\
**Created:** [October 1, 2025, 3:07pm UTC](https://discuss.elastic.co/t/elastic-agent-uninstall/382360 "2025-10-01T15:07:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matteo\_Damiano\_Zocco](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matteo_damiano_zocco/32/139802_2.png) [@Matteo\_Damiano\_Zocco](https://discuss.elastic.co/u/Matteo_Damiano_Zocco)\
**Post date:** [October 1, 2025, 3:07pm UTC](https://discuss.elastic.co/t/elastic-agent-uninstall/382360/1 "2025-10-01T15:07:32Z")

</div>

Hello Community.

I’m working on the training lab and I’m trying to configure the elastic agent with the Fleet.

Unfortunately I’m stuck on:

(elastic) elastic@ip-172-31-46-39:/usr/bin$ sudo /opt/Elastic/Agent/elastic-agent uninstall  
Error: can only be uninstalled by executing the installed Elastic Agent at: /usr/bin/elastic-agent  
For help, please see our troubleshooting guide at [Troubleshoot common problems | Fleet and Elastic Agent Guide [8.8] | Elastic](https://www.elastic.co/guide/en/fleet/8.8/fleet-troubleshooting.html)  
(elastic) elastic@ip-172-31-46-39:/usr/bin$

So I tried to:

(elastic) elastic@ip-172-31-46-39:/usr/bin$ sudo /usr/bin/elastic-agent uninstall  
[sudo] password for elastic:

But Into the lab enviromnet I guess I don’t have the password.

So I tried to download back the zip and reinstall it without any success.

How can I unstuck for going over?

Thanks,  
M.
