How Long Do Pantry Staples Last? Flour, Oil, Spices and Cans

USDA FoodKeeper gives storage times for 156 foods in the pantry staples and baking group; in the refrigerator they keep anywhere from 1–3 months to 2 years, depending on the food.

Shelf life of flour, sugar, baking powder, oils, nuts, spices, cereal and canned goods before and after opening, and how to keep pantry pests out.

Last updated:

Pantry staples and baking: storage times

Times are for quality and safety at 40°F (4°C) or below in the refrigerator and 0°F (−18°C) in the freezer. “From purchase” means counted from the day you buy it. Frozen food kept at 0°F stays safe indefinitely; the freezer times are for best quality.

FoodPantryRefrigeratorFreezer
"Genuine" Maple syrupunopened, glass4 yearsIndefinitely—
"Genuine" Maple syrupunopened, plastic2 years18–24 months—
Almond butterWhen stored in the pantry, almond butter may become hard and the natural oil may separate and float to the top; this is perfectly normal. To reincorporate the natural almond oils into the almond butter, simply mix it manually or with a hand mixer.1 year——
Almond extract2 yearsafter opening: 12 months——
Almond oil1 yearfrom purchase2 yearsfrom purchase—
Almondsno shell4 monthsfrom purchase8 monthsfrom purchase10 monthsfrom purchase
Almondsshell6 monthsfrom purchase16 monthsfrom purchase20 monthsfrom purchase
Amaranthflour, meal2 months—4 months
Applesaucecommercial12–18 monthsfrom purchaseafter opening: Not recommended—after opening: 7–10 days—
Avocado Oil2 yearsfrom purchaseafter opening: 6 months——
Bacon bitsimitation1 yearfrom purchase—after opening: Until the use-by date—
Baking powder6–18 monthsfrom purchaseafter opening: 3–6 months——
Baking soda2–3 yearsfrom purchaseafter opening: 6 months——
Barleyflour, meal3 months—6 months
Basebeef, vegetableRefrigerate after opening.Until the use-by date——
BeetspickledRefrigerate after opening.1 year—after opening: 1–2 months—
Biscuit or pancake mix9 monthsfrom purchase——
Black peppercracked, dried, commercially bottled or purchased in bulk2–3 yearsfrom purchase——
Black pepperground, dried, commercially bottled or purchased in bulk2 yearsfrom purchase——
Breadcrumbscommercial6 months——
Buckwheatflour, meal1 month—2 months
Butter flavor2 yearsafter opening: 12 months——
Cajun seasoning blendground, dried, commercially bottled or purchased in bulk1–2 yearsfrom purchase——
Cake, brownie, bread mixes12–18 monthsfrom purchase——
Canned goodshigh acid (such as juices, fruit, pickles, sauerkraut, tomato soup, and foods in vinegar-based sauce)Canned items will be safe to eat well past the ‘use-by’ or ‘best by’ date as long as the can shows no dents, rust, or swelling.12–18 monthsfrom purchaseafter opening: Not recommended—after opening: 5–7 days—
Canned goodslow acid (such as meat, poultry, fish, gravy, stew, soups, beans, carrots, corn, pasta, peas, potatoes, spinach)Canned items will be safe to eat well past the ‘use-by’ or ‘best by’ date as long as the can shows no dents, rust, or swelling.2–5 yearsfrom purchaseafter opening: Not recommended—after opening: 3–4 days—
Canola oil1 yearfrom purchase——
Capersin jarUntil the use-by date——
Cashew butterDoes not need to be refrigerated.3 months——
Cashewsno shell2–4 weeksfrom purchase6 monthsfrom purchase12 monthsfrom purchase
Cerealcook before eating (oatmeal, etc.)12 monthsfrom purchaseafter opening: 6–12 months——
Cerealready-to-eat6–12 monthsfrom purchaseafter opening: 2–3 months——
Cereal or granola bars6–12 months——
Chia seeds18 months——
Chili powder2 yearsfrom purchaseafter opening: 2 years——
Chocolateunsweetened and semi-sweet, solid1–2 yearsfrom purchaseafter opening: 1 year——
Chocolate hazelnut spreadFor best quality, do not refrigerate or microwave.Until the use-by date——
Chocolate syrup2 yearsfrom purchaseafter opening: Not recommended—after opening: 6 months—
Cinnamonground, dried, commercially bottled or purchased in bulk3–4 yearsfrom purchase——
Cinnamon extract2 yearsafter opening: 12 months——
Cinnamon rollsbaked1–3 days—3 months
Cocoa and cocoa mixesIndefinitelyfrom purchaseafter opening: 1 year——
Coconut creamcanned2–5 yearsfrom purchase—after opening: 4 days3 months
Coconut flavor2 yearsafter opening: 12 months——
Coconut flourStore in an airtight container.—9–12 months9–12 months
Coconut milkcanned2–5 yearsfrom purchase—after opening: 4 days3 months
Coconut oilRefrigeration not recommended - makes it difficult to use.Freezing not recommended - makes it difficult to use.3 years——
Corn syrupKeep tightly covered; refrigerate to extend storage life.3 years——
Cornmealregular, degerminated6–12 monthsfrom purchaseafter opening: 2 years—after opening: 1 year—
Cornmealstone ground or blue1 monthfrom purchaseafter opening: Not recommended—after opening: 2–4 months—
Cornstarch18–24 monthsfrom purchaseafter opening: 18 months——
Crackers8 monthsfrom purchaseafter opening: 1 month—after opening: 3–4 months3–4 months
Croutons5–6 months5–6 months11–12 months
Cuminground, dried, commercially bottled or purchased in bulk, opened or unopened3–4 yearsfrom purchase——
Dry stuffing mixcommercially packagedDo not refrigerate.9–12 months——
Edamamesalted, dry roasted, out of pod12 months6 months—
Farroflour, meal3 months—6 months
Flavored or herb mixes6 monthsfrom purchase——
Flaxseedground—12 monthsfrom purchase12 months
Flaxseedwhole seedNot necessary.Nnot necessary.2 yearsfrom purchase——
Flourwhite6–12 monthsfrom purchaseafter opening: 6–8 months—after opening: 1 year—
Flourwhole wheat3–6 monthsfrom purchase—after opening: 6–8 months—
Frosting or icing10–12 monthsfrom purchase—after opening: 2–3 weeks—
Fruit cocktailcanned18 months——
Fruits, driedraisins, apricots, mangoes, cranberries, etc.6 monthsfrom purchaseafter opening: 1 month—after opening: 6 months—
Garam masala1 year——
Garlicchopped, commercial jars8–12 monthsfrom purchase——
Garlic powderdried, commercially bottled or purchased in bulk3–4 yearsfrom purchase——
Gelatinflavored10–12 monthsfrom purchaseafter opening: 3–4 months——
Gelatinunflavored3 yearsfrom purchaseafter opening: Not recommended——
Graham cracker/animal cracker6–9 monthsfrom purchase——
Granola6–9 months——
Grapeseed oil1 yearfrom purchase——
Gritsboxed12 monthsfrom purchase——
Gummy (fruit) snacks6–9 monthsfrom purchase——
Herbsdried1–2 yearsfrom purchaseafter opening: 1–2 years——
Instant breakfast drinksbottled6 months——
Lemon extract2 yearsafter opening: 12 months——
Macadamiasno shell2–4 weeksfrom purchase12 monthsfrom purchase24 monthsfrom purchase
Marshmallow crème2–5 monthsfrom purchaseafter opening: 1 month——
Marshmallows1 yearfrom purchaseafter opening: 1 month——
Milkcanned evaporated or condensed12 monthsfrom purchase—after opening: 4–5 days—
Milkshelf-stable6–12 monthsfrom purchase—after opening: 5–7 days—
Milkultra-pasteurized—1–3 monthsafter opening: 7–10 days—
Milletflour, meal1 month—2 months
Molasses1–2 yearsfrom purchaseafter opening: 6 months——
Mushroomsdried1–2 yearsfrom purchaseafter opening: 3 months——
Mustarddried, ground6 months—1–2 years
Nut oils6–12 monthsfrom purchaseafter opening: 3–8 months—after opening: 6–8 months—
Nutmegground, dried, commercially bottled or purchased in bulk3–4 yearsfrom purchase——
Nutrition supplement drinksbottledUntil the use-by date——
Nutsjars or cans1 yearfrom purchaseafter opening: 2–9 months—after opening: 4–6 months6–12 months
Oatsflour, meal2 months—4 months
Oilsolive or vegetable6–12 monthsfrom purchaseafter opening: 3–5 months—after opening: 4 months—
Onion powderdried, commercially bottled or purchased in bulk3–4 yearsfrom purchase——
Peanut buttercommercial6–24 monthsfrom purchaseafter opening: 2–3 months——
Peanut buttercommercially produced, containing hydrogenated fat or other stabilizers6–9 monthsfrom purchaseafter opening: 2–3 months12 monthsfrom purchaseafter opening: 3–4 months—
Peanut butternaturalOr package use-by date, whichever comes first.—12 monthsfrom purchaseafter opening: 3–4 months—
Peanutsno shell4 weeksfrom purchase12 monthsfrom purchase24 monthsfrom purchase
Peanutsshell4 monthsfrom purchase12 monthsfrom purchase24 monthsfrom purchase
Pecanschopped—12 months2 years
Pecansno shell2–4 weeksfrom purchase9 monthsfrom purchase24 monthsfrom purchase
Pecansshell2–4 weeksfrom purchase12 monthsfrom purchase24 monthsfrom purchase
PectinUntil the use-by dateafter opening: 1 month——
Pine nutsStore in a plastic bag within an airtight container.2–3 weeks3 months9 months
Pistachiosshell or no shellRefrigeration of this item provides no benefit.Freezing of this item provides no benefit.3 weeksfrom purchase12 monthsfrom purchase24 monthsfrom purchase
Polentashelf-stableUntil the use-by date—after opening: 5–7 daysNot recommended
Popcorncommercially popped in bags2–3 monthsfrom purchaseafter opening: 1–2 weeks——
Popcorndry kernels in jar2 yearsfrom purchaseafter opening: 1 year——
Popcornmicrowave packetsAfter opening time applies to prepared product.6–12 monthsfrom purchaseafter opening: 1–2 days——
Pork rindsFrom date of manufacturer.4 months——
Potato chipsUntil the use-by dateafter opening: 1–2 weeks——
Potatoesinstant10–15 monthsfrom purchaseafter opening: 6–12 months——
Pretzels4–9 monthsfrom purchaseafter opening: 3 weeks——
Pudding mixes1 yearfrom purchaseafter opening: 3–4 months——
Pumpkin seedsraw, in-shell6 monthsNot recommended—
Pumpkin seedsraw, no shell6 months6 months—
Pumpkin seedsroasted, in-shell6 months——
Pumpkin seedsroasted, no-shellRefrigeration not necessary for unsalted pumpkin seeds.6 months——
Pure vanilla extract2 yearsafter opening: 12 months——
Roasted nuts (peanuts, cashews, almonds)Until the use-by datefrom purchaseafter opening: 1–2 weeks—after opening: 4 weeks—
Roasted red peppersjar—4–6 months—
Ryeflour, meal3 months—6 months
Salttable, plain, or iodizedIndefinitely——
Seafoodcanned1 year—after opening: 1–2 days—
Seasoning blends1–2 yearsfrom purchaseafter opening: 1–2 years——
Sesame oil2 yearsfrom purchaseafter opening: 6 months——
Sesame seeds5 years——
Shorteningsolid1–2 yearsfrom purchaseafter opening: 6–12 months——
Sorghumflour, meal2 months—4 months
Soup mixesdry bouillon1 yearfrom purchaseafter opening: 1 year——
Speltflour, meal3 months—6 months
Spice/spicesground2–3 yearsfrom purchaseafter opening: 2–3 years——
Spice/spiceswhole3–4 yearsfrom purchaseafter opening: 3–4 years——
SugarbrownSugar never spoils, but for best quality use within 2 years of opening.Indefinitelyafter opening: 18–24 months——
SugarconfectionersSugar never spoils, but for best quality use within 2 years of opening.Indefinitelyafter opening: 18–24 months——
SugargranulatedSugar never spoils, but for best quality use within 2 years of opening.Indefinitelyafter opening: 18–24 months——
Sugar substitutes2 yearsfrom purchaseafter opening: Indefinitely——
Sun dried tomatoesjar1 yearfrom purchaseafter opening: 3–6 months—after opening: 3–6 months—
Sunflower oil1 yearfrom purchase——
Sunflower seedsraw, unsalted, no shell12 months——
Sunflower seedsroasted, no shellThe (roasted) seeds will become rancid if stored at room temperature for long periods of time.12 monthsfrom purchaseafter opening: 3–4 months—after opening: 7–8 months—
Sunflower seedsroasted, salted, in shellThe (roasted) seeds will become rancid if stored at room temperature for long periods of time.Until the use-by datefrom purchase——
Syrup1 yearfrom purchase—after opening: 6 months—
Tamarind paste6–12 monthsfrom purchaseafter opening: 6 months—after opening: 2–3 months—
TapenadeNot necessary, but flavor will enhance.9 monthsfrom purchase9 monthsfrom purchase—
Tapiocas12 monthsfrom purchaseafter opening: 12 months——
Teffflour, meal2 months—4 months
Toaster pastries6–12 monthsfrom purchaseafter opening: 1–2 weeks——
Tomato paste27 monthsfrom purchase—after opening: 5 days2–3 months
Tunacanned3 years——
Tunapacket18 monthsfrom purchase—after opening: 3–4 days—
Vegetable oil sprays2 yearsfrom purchaseafter opening: 1 year——
Walnutsshell or no shell2–4 weeksfrom purchase9–12 monthsfrom purchase24 monthsfrom purchase
Whole wheat flour12 months2 years2 years
YeastpackagedStore in cool, dry place. Must be refrigerated or frozen once opened.2 yearsfrom purchase—after opening: 4 months6 months

Source: USDA Food Safety and Inspection Service, FoodKeeper data (v128 (09-06-2018)), public domain (CC0).

Pantry staples last months to years, but not forever, and the dates on boxes and cans are mostly about best quality rather than safety. In the chart, sugar and table salt keep indefinitely, whole spices keep 3 to 4 years and ground spices 2 to 3 years, while flour, oils and shelled nuts fade much sooner. Canned food sits in two bands: 2 to 5 years for low-acid foods and 12 to 18 months for high-acid ones.

How to tell if it has gone bad

Rancidity is the usual way dry staples fail. Oils, nuts, seeds and whole-grain flours develop a stale, bitter or rancid smell as they age; past that point they are best replaced. Spices and dried herbs fade rather than spoil, so a weak aroma means they will add little flavor.

Cans need a closer look. USDA says to discard cans that bulge, leak or spurt when opened, cans with deep dents or a dent on a seam, and heavily rusted cans. If the contents of any can look or smell wrong, throw them out without tasting.

Pantry pests are the other signal: small moths, beetles, webbing in a package or tiny holes in a box mean that food is infested and should be thrown away.

Storing it safely

  • Keep canned and dry goods in a cool, dry cupboard, ideally below 85°F (29°C), and never above or beside the stove, under the sink or in a damp garage.
  • Move flour, rice, cereal and dried fruit into containers with tight-fitting lids once opened; insects usually arrive in an infested package and spread to bags and boxes nearby.
  • Do not top up old flour or cereal with new; finish and wash the container first.
  • Rarely used flours, whole grains and spices can go in the freezer, and shelled nuts keep far longer cold: pecans and walnuts last 2 to 4 weeks in the pantry but 9 months or more in the fridge.

After opening

Opening a package starts a shorter clock. White flour drops to 6 to 8 months in the pantry, olive and vegetable oils to 3 to 5 months, ready-to-eat cereal to 2 to 3 months and crackers to about a month. Packaged yeast must go into the refrigerator or freezer once opened.

Canned food becomes perishable the moment the can is opened. Refrigerate what is left, preferably in a glass or plastic container, and use low-acid foods such as beans, soup and vegetables within 3 to 4 days and high-acid foods such as tomatoes and fruit within 5 to 7 days.

Frequently asked questions

Does flour go bad?

Yes, slowly. USDA FoodKeeper gives white flour 6 to 12 months unopened and 6 to 8 months in the pantry after opening, or about a year in the refrigerator. Whole wheat flour keeps only 3 to 6 months at room temperature, so a cool spot or the fridge helps if you bake with it rarely.

How long does baking powder last?

Unopened baking powder keeps 6 to 18 months and an opened can 3 to 6 months. Baking soda keeps 2 to 3 years unopened and about 6 months once open.

How long do canned goods last?

Low-acid canned foods such as vegetables, beans, soups and meat keep their best quality for 2 to 5 years; high-acid foods such as tomatoes, fruit and pickles for 12 to 18 months. After opening, refrigerate low-acid foods for 3 to 4 days and high-acid foods for 5 to 7 days.

Is it safe to eat from a dented can?

A can with a small dent that is otherwise in good shape should be fine. USDA says to discard cans with a deep dent you can lay a finger into, a dent on a seam, heavy rust, leaks or bulging.

Do sugar and salt expire?

USDA FoodKeeper lists granulated, brown and confectioners sugar and plain table salt as keeping indefinitely in the pantry. Keep them dry so they do not clump.

Sources

  1. FoodKeeper Data (v128 (09-06-2018)). USDA Food Safety and Inspection Service
  2. Shelf-Stable Food Safety. USDA Food Safety and Inspection Service
  3. Food Product Dating. USDA Food Safety and Inspection Service
  4. Pest Notes: Pantry Pests. University of California Statewide IPM Program