There's more than one way to store onions, but there's only one best way.

By Melanie Fincher

It's always good to have a few onions on hand. They're one of your biggest culinary companions no matter what the season. That's why we buy them in bulk at the supermarket, stocking up on those huge mesh bags bulging with onions of all kinds. But because their signs of spoilage aren't as obvious as that of some other vegetables, you may be keeping your onions well past their prime and not even know it.

Learn exactly how to store onions, and how long you should go before you toss them. Here's how long onions last, provided you’re storing them correctly.

How Long Do Onions Last at Room Temperature?

Ideally, onions should be stored in a cool, dark place between 45 and 55 degrees F. Whole, raw onions will last two to three months when stored in a cool, dry place. Places that provide these conditions could include a cellar, pantry, unheated basement, or garage.

But for many of us, it's a challenge to find a cool spot like this in our homes. If this is the case for you, you're better off storing onions in the fridge for maximum shelf life. But if you lack fridge space and storing onions at room temperature is your only option, whole, raw onions will last for up to a week at room temperature.

When storing onions, whether at room temperature or below, be sure to provide proper ventilation to prevent molding. An open basket, mesh bag, or loosely covered paper bag will do the trick. Do not store onions in a plastic bag, as this will not allow for proper ventilation.

How Long Do Onions Last in the Refrigerator?

While the fridge isn't ideal for storing onions, it will extend the shelf life of whole, raw onions beyond a week at room temperature. Onions absorb moisture very easily however, so their texture may get somewhat soft in the fridge. Whole, raw onions can last in the fridge for up to two weeks.

Although the fridge is not the best option for whole onions, once an onion is peeled it is best stored in the fridge to avoid contamination. Sliced or chopped raw onions should be stored in airtight containers and refrigerated. They will last seven to 10 days when stored this way.

Cooked onions should be stored in an airtight container and refrigerated. Like all leftovers, cooked onions will last up to four days in the fridge.

How Long Do Onions Last in the Freezer?

Good news! You can freeze raw onions to extend their shelf-life. Start by peeling the onions, and then chop or slice them as desired. Place them in an airtight container, freezer bag, or wrap them tightly in aluminum foil or plastic wrap. Raw onions will last up to eight months in the freezer.

Cooked onions can be frozen for up to 12 months when stored in an airtight container or freezer bag.

How to Tell If an Onion Is Bad or Spoiled

There are three ways to tell if your onions have gone bad: color, feel, and smell. 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.

And finally, who could forget the sniff test? Naturally, onions will begin to change scent as they spoil. Of course, most don't find the scent of onions pleasant to begin with, so let's just say that when your onions begin to smell like anything other than an onion, it's probably spoiled.