Here's how to prolong the life of spices and dried herbs.
Whole Spices: 2 years Ground Spices and Dried Herbs: 1 year
Do buy spices whole, versus ground, whenever possible and grind them just before using. Grinding releases the volatile compounds that give a spice its flavor and aroma. The longer the spice sits around (or is stored), the more compounds disappear.
Don't store spices and herbs on the counter close to the stove. Heat, light, and moisture shorten their shelf life.
Crumble a small amount of the dried herb between your fingers and take a whiff. If it releases a lively aroma, it's still good to go. If the aroma and color of the spice have faded, it's time to restock.