mid-14c., from Middle English raggi "ragged" + fanciful ending (or else second element is Middle Dutch muffe "mitten"). Ragged was used of the devil from c.1300 in reference to "shaggy" appearance. Used by Langland as the name of a demon (cf. Old French Ragamoffyn, name of a demon in a mystery play); sense of "dirty, disreputable boy" is from 1580s.