Dashboard Provisioning Forcing overwrite

Hello, we are using automatic dashboard provisioning, we place the dashboards under /var/lib/grafana/dashboards and Grafana always automatically modifies them, now we need to update all UIDs from dashboards and it is clear that Grafana fails to update the dashboard because the UID change, we get following error:

logger=provisioning.dashboard type=file name=default t=2024-04-05T08:23:04.605471674Z level=error msg=“failed to save dashboard” file=/var/lib/grafana/dashboards/default/prometheus.json error=“could not resolve dashboards:uid:c10dddaa-5a81-489c-b57f-6a0b7bafaa84: Dashboard not found”

Our question is, is there any way to tell Grafana it can force the UID/Dashboard overwrite by title? If not then what would be the best solution in our case? We can’t just remove dashboards manually, there are many environments/setups and we manage them all through the helm. Init container which would remove the dashboards is the most optimal way?

Update: looks like changing the json file name helps, like if original filename was prometheus.json and we change it as prometheus_2.json then it removes old dashboard and loads new one