Many people wonder how to remove inactive versions flow and process builder.
I also had such a problem as the deployment went all over the branch and the versions accumulatedvery quickly especially on the integration environment.
Hope this helps you.
The URL is the address of your org.
Version restriction made to not touch the old versions.
You can upgrade the query as you like.
New version for removing flaw from the sandbox using an array.
Added a feature: do not delete the last N versions from the active version.
link
Execute Anonymous Window:
