root@elk:/opt/elastic-agent-8.11.2-linux-x86_64# /usr/bin/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.11] | Elastic
root@elk:/opt/elastic-agent-8.11.2-linux-x86_64# cd /usr/bin/
root@elk:/opt/elastic-agent-8.11.2-linux-x86_64# 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.11] | Elastic
Yes, next time, you should run the correct command in the beginning, as I think you ended up in a half-uninstalled state.
Glad you got it fixed.
And yes, I have found when I have gotten in that state that re-installing you can get reset, and then when you want to uninstall next time, use the correct command.
It seems like a popular topic, but many threads are automatically closed without any elastic team response. One recommendation might be to document the uninstall warning/doc within the setup guide, especially for uninstall workflows that work differently than your other products.
A closed topic does not mean that it is not searchable.
Yes, I think we should perhaps we could make the warning clearer... on the other hand, the current documentation is pretty specific on what command to run to uninstall.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.