Pharmaceutical formulations including an immune response modifier (IRM) compound having a 2-aminopyridine moiety fused to a five-membered nitrogen-containing heterocyclic ring; a preservative system including a sorbic acid preservative selected from the group consisting of sorbic acid, esters thereof, salts thereof, and combinations thereof; an antioxidant; and an optional chelating agent.