How to recover from corrupted remote cache?

I had a dvc push which for some reason corrupted the remote cache, in that some of the files on the remote ended up with the wrong contents. My local cache is fine, and its only certain files in the remote. I also know the files in the git repo for which this happened. How would I recover from this, without deleting the entire remote cache? Many thanks.

Fwiw, writing a short bash script that deletes files on the remote in files/md5 whose md5sum doesn’t match the filename then re-pushing seems to have worked.