Flow must be deleted manually
Detection
Examples
Error force-app/main/default/flows/My_Flow.flow My_Flow insufficient access rights on cross-reference id
Resolution
Flow {1} can not be deleted by a metadata deployment: every version must be inactive and named one by one.
- Delete it with sfdx-hardis: list Flow {1} in manifest/destructiveChanges.xml (or preDestructiveChanges.xml), and sf hardis:project:deploy:smart deletes all its versions through the Tooling API
- If Flow Interviews still run on it, see https://sfdx-hardis.cloudity.com/hardis/project/deploy/smart/
- Or delete it manually in the target org: Setup -> Flows, context menu on {1} -> View details and versions -> Deactivate all versions -> Delete flow