It takes a lot of time for an onion to spoil. Usually, a bad onion starts turning brown or black. It can also start to smell or become slimy.
Whether you’re cooking a yellow onion, red onion, or white onion, all the signs of an onion going bad are similar. The main difference in how fast an onion goes bad is whether it’s cut open or still has the skin on it.
A regular onion will last for weeks before you cut it open. Their long shelf life is one of the reasons why grocers typically sell onions in large bags.
Sprouting onions can freak people out a bit, but you can eat them the same as any other onion. You simply cut the sprouts off and prepare the onion the same way you would any other onion.
You can keep onions from sprouting by storing them in a dark place, like the bottom shelves of your pantry or inside some of your cabinets.