mid-15c., impurite, "thing which makes or is impure;" c. 1500, "fact or quality of being impure," from Latin impuritas "uncleanness" (in a moral sense), from impurus "not pure" (see impure). Related: Impurities.
early 15c., expurgacion, "a cleansing from impurity," from Latin expurgationem (nominative expurgatio), noun of action from past-participle stem of expurgare "to cleanse out, purge, purify; clear from censure, vindicate, justify," from ex "out" (see ex-) + purgare "to purge" (see purge (v.)). Sense of "a removal of objectionable passages from a literary work" is recorded in English from 1610s. Related: Expurgatory.
U.S. slang; said in "Dictionary of American Slang" to be originally 1920s army and 1930s college student slang for "venereal disease." Thus by 1940, "dirty, disreputable person," and by 1950, "undesirable impurity." By 1945 (with various modifiers) it was the G.I.'s name for disease of any and every sort."
Perhaps this word is a continuation of crud as the old metathesis variant of curd (q.v.), which would make it an unconscious return to the original Middle English form of that word. Century Dictionary (1897) has crud only in the sense "Obsolete or dialectal form of curd."