How long do they keep and which ones; should some be refrigerated; best containers to keep them; and the best type to buy. Lastly, should I throw away spices I've had for many years, even though, they look fine?
I generally try to use up spices within 3-6 months of purchase date. Spices do lose some of their characteristics as they get older.
How much product quality deterioration is acceptable? It varies from person to person. You be the judge. After all, you're the one who's going to eat it.
My storage policy has more to do with inventory control and not accumulating too much stuff. For this reason, I tend to purchase small quantities in the bulk spice display at my local market.
I use the same general policy for things I stick in my freezer.
I refrigerate sesame seeds, since they can go rancid, as well as all ground chile peppers (to preserve the color) including paprika (both sweet and smoked), Aleppo pepper, cayenne, chili powder, whole dried red peppers, and red pepper flakes.
I refrigerate or freeze the same items as creamtea, though my motivation is combating worms/food moths which LOVE pimenton, chili flakes, chili powder etc. and sesame seeds, nuts, legumes, grains......
My (probably) very unpopular view on 'how long to keep spices?' is "as long as they smell very fragrant when you unscrew the top." My spices and herbs are kept in total darkness
and the once-a-year spices like Mace, summer savory, celery seed, turmeric, asafoetida, etc. have easily kept their fragrance for many years. My most-used are black pepper, pimenton and related, thyme, bay leaf, nutmeg, cumin and coriander,allspice, all of which are replenished once or twice a year- by being used up.
It also depends on storage conditions. Spices should be stored somewhere cool, dark, and dry. (You would never store any other perishable item next to the stove, right?) If kept like that, one year should be fine. Whole spices keep longer than ground spices. Certain whole spices keep almost indefinitely, such as star anise, cinnamon sticks, peppercorns. Oily spices, like sesame seeds and poppy seeds, should be kept in the refrigerator or freezer. Oily spices might turn rancid, but all other spices will just fade and the flavor profile will change.All that being said, like anything that's perishable, you want to buy them as fresh as possible from a merchant that has a high turnover so you know the spices have not been sitting on their shelves for years.
Do *not* do this (clear bottles on open shelves wedged between two windows):
If you simply cannot store in a dark cabinet -- and don't forget that you can get reasonably priced epoxy-coated wire racks to install inside cupboard and pantry doors) at least try to put them in a dark corner, and store them in metal or dark glass containers.
This is especially true for herbs, which will become pale in color and in flavor quite quickly. ;o)