Skip to content

Instantly share code, notes, and snippets.

@niranjan94
Forked from nathanpeck/uninstall-ecs-anywhere.sh
Last active April 6, 2026 07:59
Show Gist options
  • Select an option

  • Save niranjan94/e75dab08ceaf0c9d715e42722a69a3ca to your computer and use it in GitHub Desktop.

Select an option

Save niranjan94/e75dab08ceaf0c9d715e42722a69a3ca to your computer and use it in GitHub Desktop.
Uninstall ECS Anywhere from a host, for reinstall, or registration with a different account/region/cluster
apt remove -y amazon-ssm-agent amazon-ecs-init
rm -rfv /var/lib/amazon/ssm/Vault/Store/RegistrationKey
rm -rfv /var/lib/ecs/ecs.config
rm -rfv /etc/ecs/ecs.config
rm -rfv /var/lib/ecs/data/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment