Use your brain....
You can never get rid of a thought by resisting it.
For example, if i tell you "you can think of whatever you want, but not an elephant" most people will way that the elephant remained. A few stated something like, "i thought of a pink flamingo". So once you know the receptive, intrusive thought, label it "that is my ocd", a medical issue in my brain, and actively focus on something else.