Keith Jackson
Keith Jackson

Reputation: 3269

How To Delete an Azure Devops Release which is showing as Deployed - Error VS402946

I am trying to delete a Release from a Legacy release Pipeline but when selecting the Delete option I get the following error...


VS402946: 'My-Release-2022-01-06' cannot be deleted as it is currently deployed on stage(s) Staging.

This is nonsense in "real world" as this Release pipeline has since been replaced with another pipeline so this isn't deployed anywhere anymore.

This was a badly generated release - I don't want to remove the pipeline for legacy tracking reasons. Can this be done?

Upvotes: 3

Views: 8951

Answers (1)

Shayki Abramczyk
Shayki Abramczyk

Reputation: 41785

Three steps when you have an older release def you need to delete and it was previously deployed.

  1. Edit the definition, and delete all the environments.

  2. create an environment with a default name that is different than the original and save.

  3. Delete the environment as it will not see it as a valid deployment.

Upvotes: 4

Related Questions