1. In order to conquer sin, first of all it is necessary to hate it, to realize all its perdition and abomination before God (Eph. 4: 29-30), (1 Cor. 15:33), (James 3: 5-6).
2. Confess this sin regularly, naming the approximate number of breakdowns.
3. In place of bad language, as “anti-prayer”, prayer should reign in the soul. Try to pray more often during the day with short prayers, such as Jesus prayer.
4. Announce your decision publicly. We tend to take our vows more seriously when we know that other people will observe their fulfillment. In addition, others will mind their speech in your presence.
5. Make up a punishment for yourself. For example, in the evening, make as many earthly bows as you made swearing and immodest jokes over the past day (approximately, then a few bows for each swear word).
6. Avoid talking to people who swear (Ps. 1: 1) and teach others that you are not comfortable with it.
7. Set yourself a fine. Let this amount be not too small, but not too large. You must feel material damage out of a sinful habit. Ask the other person to spend the accumulated money, its spending should not bring satisfaction.
8. When irritation is coming, then try to speak as slowly as possible. As the Epistle of James says: If any man offend not in word, the same is a perfect man, and able also to bridle the whole body (cf. James 3: 2). When a person switches to slow speech, it is easier for him to control it. He will be able to avoid accidental pronouncing (out of habit) idle and rotten words, slanderous statements.
9. Get rid of the causes of filthiness as well: licentiousness, gluttony, drunkenness, wounded pride.
Keep in mind that filthiness is a spiritual disease, it is not difficult to unlearn it in everyday speech, but it will take much longer to recover from its use in unforeseen circumstances (for example when you fall or get hurt).