How to remove stale alerts after upgrade to 9.x

I was redirected here from the issue tracker.
Could you please instruct how to remove stale alerts after the upgrade to 9.x?
See issue: Stale alerts after upgrade to 9.x · Issue #53450 · grafana/grafana · GitHub