Is it possible to/How do I clear the deployed version to a given environment

In our SDLC, before we deploy any build to QA and then have it continue through the life-cycle, we deploy to a test VM (environment), where we reset the VM snapshot before deployment. This effectively puts that VM in a state with no deployments on it at all. When we do this, the reported versions of the projects on the Octopus dashboard that were previously deployed to that particular VM (environment) are meaningless. We would like to clear all the versions (through the Octopus API) of any projects that were deployed to that environment. Is this possible, and if so, what call would I use to do it?

Hi Britton,

Thanks for reaching out. The script below uses the API to delete all the deployments from a specific Project-Environment combination

Hope that helps!


Thanks, that worked really well. I modified it to clear all projects on the given environment automatically.