Elastic Agent broken

Thank you for providing such an wonderful tool to monitor and logs.

But unfortunately recent times Elastic agent corrupted frequently.

Elastic Agent is installed but currently broken: service exists but installation path is missing
Continuing will uninstall the broken Elastic Agent at /opt/Elastic/Agent. Do you want to continue? [Y/n]:
This will happens after restart the agent. Please help us to fix this issue.

Thanks