Spoiled onions may develop dark spots, which will eventually begin to grow mold. You'll also want to avoid onions that have started sprouting, as this indicates they're beginning to go bad. You can also feel your onions to check how fresh they are. Onions with soft or mushy spots are starting to go bad.
How long does an onion last?
Generally speaking, onions should last between seven and ten days in your refrigerator and six to eight months in your freezer, but all of that can depend on how they are stored. Chopped onions tend to keep well in your fridge, but they should be stored correctly.
How do you keep onions from spoiling?
Store cut onions in the refrigerator (or even the freezer)… You can hang on to a halved or sliced onion in an airtight container in the fridge for about one week. Store them in an airtight container (preferably a glass one, as plastic will absorb odor) to decrease oxidation, moisture absorption, and stinkiness.