I struggle a lot with this. I've just listened to Fr. Ripperger's talk on language, and it really brought home how awful this habit is, especially for a woman (which I am). Other than mentioning it in confession, how can I rid myself of this habit?
There are different degrees of "language" / "profanity". Blasphemous types of profanity should be avoided with extraordinary effort. Since these are habits, and often engaged in unconsciously, one technique I've heard recommended is to wear a rubber band on your wrist, and every time you use profanity, you'd snap the rubber band so that it inflicts some pain, as a method of negative reinforcement to break a habit ... and I've also heard of the donation jar where you'd have to put some discretionary spending money as a fine.
As for the "scatalogical" cuss words, they're more vulgarity than direct offenses against religion, and are more in the nature of, say, someone walking around flatulating in front of others. It's more unbecoming, contrary to the dignity of a Christian, etc. ... perhaps moreso for a woman than a man, for some reason, perhaps because women are supposed to be less crude, since crudeness conflicts more with the feminine than the masculine. For those words too, the above approaches might help as well.
Finally, if the scenarios in which you use these words are spontaneous expressions of frustration, try to come up with substitutes. Instead of using the typical, come up with something else that's less vulgar that you can get in the habit of using and thereby displacing or replacing the previous habit. You stub your toe and mutter a scatalogical term. That's not really an act of the will, except to have allowed the habit to form in the first place perhaps, nor is it grave matter, or even venial sin really ... just crudeness, which falls more into the category of imperfection. I know that if I hurt myself accidentally, smashing a finger, etc., I might respond with "son of a ..." (and not finish the rest). Of course, if others hear it, they can fill in the blank, as it were, but it's less crude, because it could be anything, and perhaps you could even say, "son of a codfish" or something dumb like that. And "son of a gun" is actually an attempt at substitution for the more crude form. It's why people replaced damn with "darn", others God with "Gosh". Now, that latter substitution I do not care for since it's still an obvious mangling of God's name ... so I would avoid that. LOL ... my dad, with his accent used to say, "son of a betch" ... so I would sometimes half-humorously use that. Or, one time he in his anger calls us "little shits", and then immediately amended it and said "little chiefs", so we would joke later about how he had pretended to have said "chiefs", even though the expression was nonsensical ... so we would jokingly use "chief" as a quasi-humorous substitute "cuss-word".
But "son of a ..." or "son of a gun", or some other ridiculous exclamation that you get in the habit of using might displace the original more vulgar habit. Sometimes it takes a habit to overcome another habit, since it's not a behavior that you consciously engage in and therefore might be incapable of consciously preventing.
Ideally, one would get to a point (and, again, it's "pain" scenarios that tend to elicit these responses), or watching some kind of tragedy taking place like your car getting smashed by a tree, etc. ... where if you're close to God, you see God in everything. So if I clobber my thumb with a hammer, I might raise my mind to God and accept the pain with love in reparation for my sins, etc. That would be at a higher level, though, and would require a constant awareness of God's presence so that you think of Him out of habit no matter what happens, even if it comes on suddenly. That's the idea, so that, as per the car accident someone cited, in terms of the last words the person uttered, you might instead think of God.
So perhaps, to sum up:
1) think of some negative reinforcement to combat the habit (rubber band snapping, etc.)
2) find less-vulgar substitute words and being trying to use them in situations where you might have theretofore used a vulgar form
3) practice a constant awareness of God's Presence, so that such awareness becomes habitual and you see Him in everything, even sudden calamities