EC2에서 ElasticSearch agent 제거 방법은 다음과 같다
sudo elastic-agent uninstall
해당 명령어를 치면
ubuntu@ip-172-31-1-161:/var/lib$ sudo elastic-agent uninstall
Elastic Agent will be uninstalled from your system at /opt/Elastic/Agent. Do you want to continue? [Y/n]:y
Stopping service........................ DONE
Stopping upgrade watcher; none found... DONE
Removing service...... DONE
Removing install directory...... DONE
Elastic Agent has been uninstalled.
이렇게 뜨면서 agent가 사라진다.
이제 Elastic agent 설치하러 뿅 사라지겠다