A green potato can make you wonder whether it is still safe to eat. The green color comes from chlorophyll, which develops when potatoes are exposed to light. However, light exposure can also be associated with increased levels of natural compounds called glycoalkaloids, including solanine and chaconine. In large amounts, these compounds may cause nausea, vomiting, stomach cramps, and headaches.
If a potato has only a few small green patches and is still firm and healthy, peel it thoroughly and cut away the green areas, eyes, and sprouts. Remove more than just the surface discoloration. If the potato is extensively green, heavily sprouted, soft, shriveled, or otherwise questionable, the safest choice is to discard it. A simple rule to remember is: when in doubt, throw it out.
A bitter taste can also be a warning sign, although you should never deliberately taste a questionable potato to test it. If a properly prepared potato tastes unusually bitter, it is better not to eat it. Cooking is not a reliable way to eliminate glycoalkaloids, so boiling, baking, or frying should not be relied upon to make a heavily green potato safe.
The best way to prevent potatoes from turning green is to store them in a cool, dark, dry, and well-ventilated place. Keep them away from sunlight and bright kitchen lights, and avoid storing potatoes and onions together. For ordinary raw potatoes, a pantry is generally preferable to refrigeration. Buying smaller quantities can also help prevent potatoes from sitting around long enough to deteriorate. Overall, a small green patch does not automatically mean the entire potato must be discarded, but extensive greening or signs of deterioration are good reasons to throw it away.