elastic/ingest-docs

Fix instructions for uninstalling agent

Closed this issue · 0 comments

The instructions in Uninstall Elastic Agents from edge hosts aren't working. See SDH for reference and suggested fix for the docs.


Customer Details - Description:
customer is trying to uninstall elastic agent

  • docs - https://www.elastic.co/guide/en/fleet/current/uninstall-elastic-agent.html#_uninstall_on_macos_linux_and_windows
    • snippet from docs - Be sure to run the uninstall command from the directory where Elastic Agent is running, as shown in the example below, and not from the directory where you previously ran the install command. Running the command from the wrong directory can leave the agent in an inconsistent state.
  • But, if we run uninstall from where it is running, then we receive this error message
    • error message - Error: error uninstalling agent: uninstall must be run from outside the installed path

So, the correct solution to uninstall elastic agent is to ...

  • be in a directory outside of of current install location.
  • install location is C:\Program Files\Elastic\Agent
  • run the command in C:\Program Files\Elastic or \tmp or even your default home directory
  • then run the uninstall command C:\"Program Files"\Elastic\Agent\elastic-agent.exe uninstall