Removing a previous deployment

When waypoint up is executed multiple times, there are always 2 deployments left: the first is the release, the second is the previous deployment. Is it possible to delete the previous deployment so that only one release remains?
I tried to delete the previous deployment using waypoint deployment destroy but the error always appears

! Error destroying the deployment: rpc error: code = Unknown desc = ResourceInUse: Target group
'arn:aws:elasticloadbalancing:us-east-1:00000000:targetgroup/hamster-01FC81NRD97712F5CCQ2YEKC/5bfc6c95fe567b7d' is currently in use by a listener or a rule
        status code: 400, request id: 738e3a32-c421-4268-91cb-eaef6753983a

Hello @psihachina !

It sounds like you are wanting something like the -prune-retain flag for the release lifecycle: Lifecycle: Release | Waypoint by HashiCorp

If you don’t want to keep any past deployments, you can specify a value of 0 for -prune-retain.

It’s interesting that you are getting an error here. If you are still getting an error when you try the -prune-retain flag, I recommend opening an bug report issue on the Waypoint GitHub repo so we can take a look! Thank you :smiley:

It’s interesting that you are getting an error here. If you are still getting an error when you try the -prune-retain flag, I recommend opening an bug report issue on the Waypoint GitHub repo so we can take a look! Thank you :smiley:

Actually, I went ahead and created an issue here since it’s likely going to still be a bug. If you have any more context please feel free to share it on the GitHub issue, thank you!