Beans are popular in most of the world's culinary traditions for a lot of good reasons: They're tasty; they're an excellent source of protein and fiber, and they're one of the few protein-rich foods that naturally keeps for a long time. They can still spoil, of course — whether they're fresh, dry or canned — so it's handy to know what signs show that you should toss them out.

The Difference Between Spoilage Bacteria and Pathogens

Whenever you're talking about food going bad, it's important to recognize that there are two entirely separate groups of microorganisms at work.

Molds and spoilage bacteria cause your foods to spoil visibly, with weird smells, visual deterioration and sometimes a slimy film that grows on the food. There may not even be any bacteria or fungi involved: All foods contain natural enzymes that break them down over time, so they'll decompose and become compost.

Pathogens are different. Those are the "bugs" that can make you really sick, like salmonella, E. coli and listeria. You can't see them, smell them or taste them, which is part of what makes them dangerous. With these germs, you have to know a few food safety guidelines and use some common sense.

Fresh Beans in Their Pods

Fresh beans in their pods aren't especially perishable, and they'll easily last three to five days in your fridge. They can go longer if your fridge is a good one and the vegetable crisper is well-designed. The rust spots on green beans are safe to eat, if any of those should develop, but you can cut them off if you don't like the look of them.

As they get older, your beans may start to look shriveled and dry, which makes them a bit leathery. They're still edible, just not as good. If your green beans are slimy in the bag, that's a different story. They're starting to decompose, and you should just toss them.

Cooked green beans are good for three to five days in your fridge, as well. If you're not going to eat them by that time, you should package them in airtight in freezer bags and put them in the freezer. If you've done a good job of extracting as much air as possible from the bag, they can last up to a year.

Dry Beans and Spoilage

Dry beans are among the longest-lasting of all natural foods, with a shelf life that's measured in years rather than days or weeks. As long as you keep them in a cool, dark place and a well-sealed container, they'll last almost indefinitely. They taste and cook best within the first couple of years, though.

Moisture is your only real enemy with dry beans. If they show signs of moisture or condensation, or especially if they're sprouting, you should discard them. If they show any signs of mold or fermentation, definitely get rid of them. Molds can create some pretty nasty toxins.

Once they're cooked, the beans are just as perishable as any other leftovers and will last three to five days in your fridge. If your beans taste sour that means they've begun to spoil and ferment, and you should definitely throw them out.

Canned Food Hisses When Opened

Canned beans are a reliable staple to keep on hand for quick meals when you don't have the time to mess around with soaking and cooking dried beans. As a rule, the shelf life of commercially canned food is pretty nearly infinite, as long as the can's seal remains intact. It's best within the first three to five years, but you can still safely eat it after that.

Once you've opened the can, your beans will last the same three to five days as any other leftovers.

If the can is visibly rusted or damaged, or if it's been exposed to extremes of heat and cold, the beans might not be food safe any longer. If it hisses and sprays when you open it, that's definitely a bad sign. It means the beans inside have fermented, and shouldn't be eaten. Other forms of spoilage, including the bacteria that cause botulism, can't be seen or smelled. Where cans are concerned, "When it doubt, throw it out" is a good rule to follow.

About the Author

Fred Decker

Fred Decker is a trained chef, former restaurateur and prolific freelance writer, with a special interest in all things related to food and nutrition. His work has appeared online on major sites including Livestrong.com, WorkingMother.com and the websites of the Houston Chronicle and San Francisco Chronicle; and offline in Canada's Foodservice & Hospitality magazine and his local daily newspaper. He was educated at Memorial University of Newfoundland and the Northern Alberta Institute of Technology.