clear (one's) name
To exonerate oneself or another of a criminal charge or allegation of wrongdoing. I was only accused of that crime because I look like the perpetrator, so I was able to clear my name. Good luck trying to clear your name once people think you've done something wrong.
clear one's name
Also, clear oneself. Prove someone (or oneself) innocent. For example, She not only wanted to be acquitted, she wanted to clear her name entirely. This locution employs the verb clear in the sense of "purify" or "wash away a stain." [Late 1400s]