Whirling blade–style coffee grinders are cheap and useful for lots of things besides grinding coffee—such as grinding spices. But since you can't immerse an electric grinder in water, how do you get it clean?
The answer is to grind something in the grinder that will absorb the oils and odors without adding any of its own. Chowhound escondido123 uses a piece of bread, as demonstrated in this CHOW Tip. Meanwhile, chileheadmike runs kosher salt through the grinder, and scubadoo97 uses uncooked instant white rice—but make sure it's instant (parboiled) rice, not regular rice, or it might break your grinder, chefj says. Sugar also works well to absorb oils and odors, whether from coffee or other spices, ellabee says.
After grinding your neutral, absorbent substance, wipe out the grinder with a dry paper towel, a damp one, then another dry one, then air it out before putting the lid back on, ellabee says. And if your grinder was particularly smelly, try wiping it out with vinegar to eradicate the smell, kimeats says.
Discuss: Cleaning a coffee grinder?