8

Codedeploy setup which we currently have is running out of space, Now we have to manually delete the archives at location /opt/codedeploy-agent/deployment-root/.

How can we clean up the archives regularly? I thought codedploy agent should take care of Archives.

Praveen Govind
  • 2,619
  • 2
  • 32
  • 45
  • 5
    Use cronjob for removing files on instance */30 * * * * cd /opt/codedeploy-agent/deployment-root/ && sudo rm -rf * it will run every 30 minutes – Rohit Dalal Jul 18 '17 at 11:53
  • Configure max_revisions, per http://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent.html#codedeploy-agent-revisions-logs-cleanup. – jarmod Jul 18 '17 at 12:39
  • 1
    @RohitDalal Every 30 minutes is way more than you could possibly need, and you are likely to delete something while it's being installed. Run it once a day at most. – Ariel May 17 '23 at 08:22

0 Answers0