Yeast is a living creature that is shipped in a dormant condition. So like any organism, they have a shelf life from 3 days to 24 months. It is always important to buy yeast from a reputable store and ensure that it is kept in a cool dry place (away from sunlight and not in the freezer). Using bad yeast means that all the effort you put into making the homebrew will go to waste. There are Four kinds of yeasts used in home brews.
Dry Yeast (like the ones sold at arishtam) They have an 18-24 month shelf life. Commercial Liquid Yeast: which has a shelf life of 1 week. If you are buying imported yeast, it might be difficult Self-propagated cultures: You could take some yeast sediment (trub) from your previous batch, wash the yeast, and maintain the culture. As long as you can keep it in the refrigerator and feed it every 3rd day, you can keep it for years. Slants: Seasoned pro home brewers can maintain their slant bank in agar medium for 3 years by freezing them. Home oven-dried yeast is usually able to survive 1 month of storage.