I was running a prefect flow but facing a run out ...
# ask-community
t
I was running a prefect flow but facing a run out of memory issue, how can I clear up and free the space. I saw a 17G .prefect file in the root directory, can I remove it?
k
You can delete those files if you don’t need them. They are checkpoints from the flow runs. You can also turn off checkpoints with
Copy code
@task(checkpoint=False)
def ...
t
Thank you for your reply!! Can I clean the checkpoints for a specific flow since we have several flows ran.
k
These checkpoints are mainly for restarting a flow run from failure. Instead of re-running the previous tasks, it will pull the checkpoint. So you can delete most of them safely
Like just leave the most recent ones.
t
Thanks!!! So for accessing the checkpoints - I cd into .prefect/flows/name_of_my_flow , I see multiple files in there - is this the correct place to delte the checkpoints? and how do I know which one is the latest ?
k
yes exactly. can you sort it by time?
t
Okay, can i remove the entire folder or remove all the checkpoints inside.
k
All might be aggressive but as long as you dont have future flows that rely on these, yeah it should be fine
t
Thank you very much! Space error fixed!