What kind of pants? Liquid detergent or dishwashing liquid and a bit of scrubbing usually gets it.