If I use prefect cloud, does that mean that I don'...
# ask-community
k
If I use prefect cloud, does that mean that I don't need to set up a database then?
n
thats correct 🙂
k
@Nate thanks! How would I deal with issues like this then? https://prefect-community.slack.com/archives/CL09KU1K7/p1684238452385819 I manually deleted all the "cancelling" flow runs via the cloud UI but it would be great if I could delete it via the CLI as well, especially if I have 100+ flow runs in this state.
n
are you looking to bulk delete flow runs?
k
Yep, since many of them are/were stuck in the cancelling state
n
gotcha, there's a bunch of different ways you could do this but this is probably the best bet a slightly more hacky way is this
Copy code
prefect flow-run ls | awk 'NR>3 {print $2}' | while read -r line
do
    prefect flow-run delete "$line"
done
k
Great, thanks @Nate!
n
i realize now only the api endpoints themselves were linked, but just to note there are client methods that would make those api calls a lot easier 😄 read flow runs delete flow run (by ID)