Hi community, Is there an easy way to clean up the...
# ask-the-community
r
Hi community, Is there an easy way to clean up the Flyte workspace and delete all the workflows and tasks? I guess we can drop and recreate the container that is persisting the state.
d
Hi @Robert Ambrus you can delete workflow executions (see https://docs.flyte.org/projects/flytectl/en/latest/gen/flytectl_delete.html) You can also archive workflows but not delete them
are you using sandbox?
r
no, we are on EKS
d
ok, in that case, dropping the container wouldn't help I think. Workflow executions are stored in the DB
r
ok
so probably we need to archive or delete, right?
d
yes, I think so
r
all right, will do, thank you!
g
Relating to this, was wondering how to clean up already completed executions:
Copy code
flytectl get execution -p tmp -d development -o yaml | yq -r '.[].id.name' | xargs -I {} flytectl delete execution -p tmp -d development {}
Gives for executions in all kind of phases (
ABORTED
,
FAILED
,
SUCCEEDED
):
Copy code
Error: rpc error: code = FailedPrecondition desc = Cannot abort an already terminate workflow execution
y
how old are these? there should be cleanup logic.
g
These are all created in a single day (so max 8hrs), but since I was experimenting a lot I wanted to clean them up and declutter. Would they get auto-removed after a while?