The companies that sell these recommend that you only keep them 1 year beyond purchase. I find that if it still smells and tastes, then I use it -- and as it ages and loses potency, I just use more.
However, there is NO comparison between store bought seasonings and those that you grow and dry yourself!! These are so potent that I find I can keep them for years. They are stored as whole as possible in glass jars, kept in a dark cabinet away from heat. I grind them as I need them.
Otherwise, as one suggested, freezing could be an answer.
Most herbs grow here in Montana, outside in the summer. I don't grow anything inside in the winter -- just not set up for it. However, we do have a greenhouse that we keep our potted citrus trees in. It's a bit too cool for most herbs, and those that tolerate cooler temperatures I already have enough of from the summer.
As for spices, most of those are tropical so I can't grow them, anyway. I buy them as whole as possible (nutmeg, peppercorns, etc.) and only grind them when I need them, and only as much as I need at a time. Rasps are great!