- Newest
- Most votes
- Most comments
I have managed to fix this by opening up the 'successful' Association command, using Copy to new and setting the optional Version parameter to 1.3.2. This showed errors trying to uninstall 1.7.0, but then continued and successfully installed 1.3.2. I've now run a successful deploy.
Hello.
I think it can be deleted using the following command.
https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-uninstall.html
sudo dpkg --purge codedeploy-agent
Hello,
To completely remove the CodeDeploy agent and ensure a clean reinstall, try the following steps:
- Purge the package:
sudo dpkg --purge codedeploy-agent
Remove remaining files:
sudo rm -rf /opt/codedeploy-agent /etc/codedeploy-agent /var/codedeploy-agent
Clean apt cache:
sudo apt-get clean
Re-run the Systems Manager association:
Hi Kranthi, I ran these commands, rebooted, but unfortunately, I still get 'AWSCodeDeployAgent 1.7.0 is already installed'. If I connect to the instance:
root:/var/snap/amazon-ssm-agent/8254# systemctl status codedeploy-agent Unit codedeploy-agent.service could not be found. root:/var/snap/amazon-ssm-agent/8254# service codedeploy-agent status Unit codedeploy-agent.service could not be found.The previous agent was Version: 1.3.2-1902

Sorry I forgot to include that I had already run that command as well
Is it still not possible to delete it even if I select uninstall in "Action" as shown below? I tried it in my environment and was able to remove it from Systems Manager and reinstall it as shown in the image below.
By the way, you may also try running the following command.