I this sutta Buddha discusses about 5 methods of getting rid of distracting thoughts during meditation when evil unskillful thoughts connected with desire, hate, and delusion arise in a person who is intent on the higher consciousness (Jhanas).
1. Replace: he should reflect on a different object which is connected with skill.
2. Reflect: he should ponder on the disadvantages of unskillful thought.
3. Reject:he should in regard to them, endeavor to be without attention and reflection.
4. Removal: he should reflect on the removal of the (thought) source of those unskillful thoughts.
5. Restrain:he should restrain, subdue and beat down the (evil) mind by the (good) mind, with clenched teeth and the tongue pressing on the palate.