Automation is wonderful for creating things, configuring things and moving things.
Automation should never "clean up". Do your cleanup manually, or this is what you get.
Automation should never "clean up". Do your cleanup manually, or this is what you get.
When I need to do this, I make sure there's a specific /logs or /backups folder where only certain filetypes of a certain modified dates are deleted.
It works ok in practice.
You describe what you want your deploy to look like, and that's what gets deployed. It doesn't start removing/deleting things to match.
It might take resources offline or leave them orphaned, but never delete them.