To expurgate is to censor. Usually, people talk about expurgating bad words from something written or on TV.
On TV, if you hear some words bleeped out, those words have been expurgated. In print, we can expurgate by using dashes ( — — ) or random characters like %&$#. Sometimes we can expurgate just by rewriting something so that the entire sentence with the naughty parts is gone, or by putting it into mild words. When it comes to things children read or watch, there's often the difficult question of what to expurgate and what to leave alone.