I usually come across this when upgrading to a new Revit version. I find lots of backup files in my library due to modifying/improving my families, and I'm too lazy to delete them then and there.
So I wrote this little script that does it for me. I copy it in root folder of my library and just start it once in a while. It deletes backup files in all sub directories and it deletes them even if they are read-only protected.
Due to all our revit libraries being so precious I would never provide an executable file for you to click on and destroy your library by some malicious idiot's program.
Here is the actual script that you paste into a notepad file and change the file extension to ".bat"
del *.00??.rfa /S /F
As you can see above, it is a delete function for all files ending with .00xx.rfa
"xx" being any number while "00" being static. You can change this to be "xxxx" if you really want and get rid of the static "00".
Due to that dot before 00xx, I am positive only revit backup files will be removed since no one has a file ending with a dot and 4 number characters. If you do, then this is not a solution for you.
/S is to do with subfolders and /F deleting read-only files.
Have fun, but I advise you to test it in a new folder so you can be sure before applying to library. I was a bit nervous myself but thorough testing has help me alleviate those fears.
Regards,
Milos