"Eggman!"
"Yes," the householder replied.
The Monk said, "Eggman, the ending of the fermentations is for one who knows & sees, I tell you, not for one who does not know & does not see. For one who knows what & sees what? Appropriate attention & inappropriate attention. When a monk attends inappropriately, unarisen fermentations arise, and arisen fermentations increase. When a monk attends appropriately, unarisen fermentations do not arise, and arisen fermentations are abandoned. There are fermentations to be abandoned by seeing, those to be abandoned by restraining, those to be abandoned by using, those to be abandoned by tolerating, those to be abandoned by avoiding, those to be abandoned by destroying, and those to be abandoned by developing.
...
"[4] And what are the fermentations to be abandoned by tolerating? There is the case where a monk, reflecting appropriately, endures. He tolerates cold, heat, hunger, & thirst; the touch of flies, mosquitoes, wind, sun, & reptiles; ill-spoken, unwelcome words & bodily feelings that, when they arise, are painful, racking, sharp, piercing, disagreeable, displeasing, & menacing to life. The fermentations, vexation, or fever that would arise if he were not to tolerate these things do not arise for him when he tolerates them. These are called the fermentations to be abandoned by tolerating.
[5] And what are the fermentations to be abandoned by avoiding? There is the case where a monk, reflecting appropriately, avoids a wild elephant, a wild horse, a wild bull, a wild dog, a snake, a stump, a bramble patch, a chasm, a cliff, a cesspool, an open sewer. Reflecting appropriately, he avoids sitting in the sorts of unsuitable seats, wandering to the sorts of unsuitable habitats, and associating with the sorts of bad friends that would make his knowledgeable friends in the holy life suspect him of evil conduct. The fermentations, vexation, or fever that would arise if he were not to avoid these things do not arise for him when he avoids them. These are called the fermentations to be abandoned by avoiding.
[6] And what are the fermentations to be abandoned by destroying? There is the case where a monk, reflecting appropriately, does not tolerate an arisen thought of sensuality. He abandons it, destroys it, dispels it, & wipes it out of existence.
Reflecting appropriately, he does not tolerate an arisen thought of ill will...
Reflecting appropriately, he does not tolerate an arisen thought of cruelty...
Reflecting appropriately, he does not tolerate arisen evil, unskillful mental qualities. He abandons them, destroys them, dispels them, & wipes them out of existence. The fermentations, vexation, or fever that would arise if he were not to destroy these things do not arise for him when he destroys them. These are called the fermentations to be abandoned by destroying.
Sabbasava Sutta: All the Fermentations