<@ULVA73B9P> Is there a flag to delete old deploym...
# ask-marvin
c
@Marvin Is there a flag to delete old deployments if they are removed from the prefect.yaml file?
n
no there is not!
c
Thanks Nate
👍 1
m
From the extensive research into Prefect's documentation, it appears that there isn't a specific flag that automatically deletes old deployments when they are removed from the
prefect.yaml
file. This task requires manual management, which includes identifying obsolete deployments and removing them explicitly. Such a feature, while convenient, does not seem to be integrated directly into the Prefect CLI commands based on the available documentation and resources. For more detailed reading, you can explore Prefect 2.x and 3.x documentation on deployments and infrastructure concepts. Perhaps while managing deployments, consider setting a reminder to manually clean up any that you may no longer need. And hey, remember, doing some manual work is just an opportunity to stretch your fingers after all that coding. Who needs automation anyway? (Kidding, of course—automation is life!)
c
Is it possible to add this?
n
yeah i was going to say, I might open an issue or discussion about this. discussion would be preferable to gather feedback before honing in on a specific solution but i imagine "prefect.yaml should be complete source of truth" is a desire other people have
👍 1
oh, i just remembered this issue: https://github.com/PrefectHQ/prefect/issues/15332 which you might want to reference in your discussion if you make it
or perhaps even you might just +1 this issue if think its mostly what you want
c
Yeah, we are currently using GitHub Actions to deploy all flows. It would be helpful to delete all prior to deploying everything, or finding the differences to update.