Just to be sure: are you asking for Server? if so, then you have several options:
1. You can build some script that regularly deletes old flow runs directly from the database.
2. You can do the same as #1 using GraphQL: first query for old flow run ids, then use a mutation delete_flow_run
if you’re asking for Cloud - we do this automatically based on the retention period specified in your Cloud plan.