Stopping rituals from OCD (obsessive compulsive disorder) involves participating in a form of therapy called exposure response prevention. This is where you don't go through with your compulsions (rituals) when your obsessive thoughts occur. Usually, then you have an unwanted, intrusive, obsessive thought, it causes much anxiety. So to counteract the anxiety caused by the obsessions, you then are compelled to act and carry out your rituals. However, the rituals only decrease the anxiety for a very short while...but over the long run, the rituals and compulsions serve to maintain and perpetuate the negative cycle of OCD.
So the only way to stop the rituals is to replace the rituals with something else to decrease the anxiety from the obsessions. Instead of going through with the rituals, you should instead engage in relaxation strategies to reduce the anxiety. Eventually, after you find effective relaxation techniques, you will find that your need to participate in rituals goes away.