Pantry Storage

Pantry Food Storage: Keep Dry Foods Fresh Longer

Your pantry is where food lasts longest, and where it quietly goes stale, rancid or buggy when it’s stored wrong. White rice and dry pasta keep for years. Opened ground coffee and bulk shelled peanuts or walnuts lose their best flavor in weeks. This page brings it all together: the four things that ruin pantry food, a storage-time table from the USDA, and what to do about bugs.

On this page: The four pantry enemiesContainers: what actually helpsHow long pantry staples keepPantry, fridge or freezer?Bugs in the pantryAll pantry articles

Keep dry food dry, cool and out of direct light (my advice), in containers with tight-fitting lids once the package is open, and use the oldest first. Most pantry staples keep for months to years, but those times are about quality, not safety: the USDA says sugar “never spoils,” and canned goods stay safe past the date as long as the can has no dents, rust or swelling. Nuts, whole wheat flour and opened ground coffee keep much better in the fridge or freezer.

Moving flour, rice and cereal out of their bags? The canister set I’d pick (why this one): Vtopmart airtight containers, 24 pcs (Amazon; as an Amazon Associate I earn from qualifying purchases)

The Four Pantry Enemies

Almost every pantry problem comes down to four things. Knowing which one you’re fighting tells you what to do.

🔥 Heat

Warmth speeds up staleness and makes the oils in nuts, whole grains and cooking oil go rancid sooner, so keep food away from the stove, oven and dishwasher (my advice).

💧 Moisture

UC IPM says moisture favors pantry pests, and microbes that rot food do best in warm, humid conditions. A dry shelf and a closed lid are your friends.

💨 Air and light

Air makes coffee stale and helps oil go rancid; keep spices out of bright light too (my advice). The FoodKeeper calls an airtight container “critical” for ground coffee kept in the fridge.

🐛 Pests

Pantry moths and beetles. UC IPM advises containers with tight-fitting lids, not plastic bags. See bugs in the pantry below.

Containers: What Actually Helps

UC IPM, the University of California’s pest program, advises storing dry food and bulk goods in containers with tight-fitting lids, not plastic bags. It also says to clean containers before you refill them and not to mix old and new food in one container. That last one is easy to forget: topping up half a jar of old flour with a new bag means the old flour never gets used.

My tip: when you decant something, write two things on the label: what it is, and the date you opened the original package. The storage times below count from that date, not from when you moved it into a jar.

Not sure which containers to get? Here are the airtight container sets I’d pick (with a “will my bag fit?” check), and what BPA-free on the label really means.

How Long Pantry Staples Keep

These are USDA FoodKeeper times for best quality, stored in a cool, dry pantry. They’re not “throw away” dates: past them, food usually just tastes flatter, staler or a bit rancid. Anything with bugs, mold or a bad smell goes out regardless of the date.

FoodUnopened (from purchase)After openingNote
Flour, white6 to 12 months6 to 8 monthsUp to 1 year in the fridge. Flour
Flour, whole wheat3 to 6 monthsFridge: 6 to 8 monthsNatural oils go rancid faster
Sugar, white or brownIndefinitelyBest within 18 to 24 months“Sugar never spoils” (USDA). Soften brown sugar
Rice, white or wild2 years1 year6 months in the fridge. Long-term rice
Pasta, dry (no egg)2 years1 yearPasta. Cooked pasta is a fridge food: cooked pasta
Beans, dried1 to 2 years1 yearDried beans
Oats and other “cook before eating” cereal12 months6 to 12 monthsOats
Breakfast cereal, ready-to-eat6 to 12 months2 to 3 monthsClose the inner bag well
Olive or vegetable oil6 to 12 months3 to 5 months4 months in the fridge. Cooking oil
Spices, ground2 to 3 years2 to 3 yearsWhole spices: 3 to 4 years. Spices
Baking powder6 to 18 months3 to 6 months
Baking soda2 to 3 years6 months
Coffee, whole beans3 to 5 months3 to 5 monthsCoffee beans
Coffee, ground (store-bought, non-vacuum)2 years2 weeks1 month in the fridge, airtight
Tea bags18 to 36 months6 to 12 monthsTea
Honey2 yearsBest quality, not a spoil date: honey

Source: USDA FoodKeeper. “Unopened” counts from the day you bought it. Package dates: the FDA says a “use by” date is the maker’s advice for best flavor or quality, not a food safety date (infant formula is the exception).

Pantry, Fridge or Freezer?

Not everything sold on a shelf should stay there. The FoodKeeper numbers make the point:

  • Nuts: shelled peanuts last 4 weeks in the pantry but 12 months in the fridge and 24 months in the freezer; walnuts 2 to 4 weeks in the pantry, 9 to 12 months in the fridge. More in how to store nuts.
  • Whole wheat flour: 3 to 6 months in the pantry, 6 to 8 months in the fridge once opened.
  • Opened ground coffee: 2 weeks in the pantry, 1 month in the fridge in an airtight container, 6 to 12 months in the freezer.
  • Opened syrup belongs in the fridge: storing syrup.

And some things you shouldn’t move to the fridge at all: see foods that should not be refrigerated.

Bugs in the Pantry

Small moths flying out of the cupboard, or tiny beetles in the flour? Both are common, and both are fixable without spraying. The short version: throw out infested food in a sealed bag, check everything else, vacuum and wash the shelves, and store dry food in containers with tight-fitting lids. The full steps:

My tip: freezing new flour for a full week before it goes into the canister is cheap insurance against eggs that came home in the bag. The details are on the flour page.

A Simple Pantry Routine

  1. New behind old. Put new purchases behind the older ones (my advice).
  2. Close or decant every opened bag into a container with a tight-fitting lid (UC IPM).
  3. Date what you decant with the date you opened it (my advice).
  4. Once a month, sniff test the fat-rich stuff: nuts, whole wheat flour, oil and coffee. Stale or rancid smell means it’s past its best (my advice).
  5. Check cans: the FDA says to throw away cans that are swollen, leaking or deeply rusted, or dented so badly they won’t stack or open normally.
  6. Keep cleaning products elsewhere. The FDA says not to store food near household cleaning products and chemicals.

21 articles

Marleen’s advice: pantry

All pantry articles. Every article below covers one pantry food: how long it lasts, where to keep it and how to tell when it’s past its best.

Pantry Questions

How do you keep dry food fresh in the pantry?

Keep it cool, dry and dark, and move it into containers with tight-fitting lids once the package is open (UC IPM advises against plastic bags). Use the oldest first and date what you decant.

Do pantry foods go bad after the date on the package?

Usually they lose quality rather than become unsafe. The FDA says a “use by” date is about best flavor or quality, not safety, except for infant formula, and the FoodKeeper says canned goods are safe well past the “use-by” or “best by” date as long as the can has no dents, rust or swelling. Throw out anything with bugs, mold or an off smell.

How long does flour last in the pantry?

White flour keeps 6 to 12 months unopened and 6 to 8 months after opening, according to the USDA FoodKeeper; up to a year in the fridge. Whole wheat flour keeps 3 to 6 months in the pantry.

Which pantry foods should go in the fridge?

Nuts, whole wheat flour and opened ground coffee keep much longer in the fridge or freezer, according to the FoodKeeper. Opened syrup belongs in the fridge too.

Does sugar ever go bad?

No. The USDA FoodKeeper says sugar never spoils, but for best quality use it within 2 years of opening.

Sources & Transparency

Storage times: USDA FoodKeeper. Date labels, cans and chemicals: FDA, “Are You Storing Food Safely?”. Containers and pests: UC IPM Pest Notes: Pantry Pests. Tips marked as mine are my own advice.

Last updated: