We’re probably all guilty of having a few spice jars festering at the back of our cabinets, but you should really have a clear-out of your spice rack at least every 12 months. Spices deteriorate very quickly, and after six months they’ll have lost most of their flavor, especially if they are already ground.
So: the first rule? Don’t buy in bulk. Only purchase what you think you will need within the next six months or so. Keep them in an airtight container, away from direct sunlight and heat (a tin is better than a jar for this reason). Whole spices will stay fresh longer than ground ones, so, where possible, buy whole and grind as and when you need them.