How to Tell if Pantry Staples Have Gone Bad
My mother's recipe cards never mentioned expiration dates, because for most of what she kept in the pantry, there was not a single date that mattered. Flour, rice, dried beans, spices, these things do not go bad the way milk does.

My mother's recipe cards never mentioned expiration dates, because for most of what she kept in the pantry, there was not a single date that mattered. Flour, rice, dried beans, spices, these things do not go bad the way milk does. They go stale, lose potency, or occasionally host something you really do not want in your cooking. Knowing the difference saves money and keeps you from tossing food that is still perfectly fine.
The date on the package is mostly a suggestion
Best-by dates on shelf-stable pantry goods are set by manufacturers for peak quality, not safety. Dried pasta two years past that date is very likely still fine to eat, just maybe slightly less springy. Flour is similar, though it has its own clock running separately from the printed date, which matters more than most people realize.
Flour and grains: smell before sight
White flour keeps for six to eight months at room temperature and up to a year in the freezer. Whole wheat flour and anything with the germ intact, including whole grain rice and oats, goes rancid faster because those oils oxidize. The test here is your nose, not your eyes. Rancid flour smells faintly sour or like old paint, not simply dusty. If it smells like nothing, it is almost certainly fine, even well past its printed date.
Rice and dried beans last years in a sealed container, but they lose moisture over time and take longer to cook as a result. This is not spoilage, it is just a reason to soak older beans a little longer or add extra water to older rice.
Spices lose power, they rarely turn dangerous
Ground spices lose potency after six months to a year, whole spices hold their strength for two to three years. The practical test is simple: rub a pinch between your fingers and smell it. If the aroma is faint or absent, the spice will not ruin a dish, it will simply do nothing for it. Replace it when you notice the flavor missing, not on a fixed calendar schedule, since storage conditions vary more than package dates account for.
This same patience applies to how you stock a pantry for a bad cooking day, a well-stocked shelf is only useful if what is on it still has flavor left to give.
Oils are the one category where I would be more careful
Unlike flour and spices, which mostly just get weaker, oils can genuinely go rancid in a way that affects both taste and, over time, quality in a less forgiving way. Rancid oil smells like crayons or old paint, a distinct off note that is hard to miss once you have smelled it once. Olive oil, with its shorter shelf life of twelve to eighteen months once opened, is the most common offender in a home kitchen. Store oils away from heat and light, which slows the process considerably, and buy smaller bottles if you cook with a particular oil infrequently.
Where I disagree with the strict throw-it-out advice
A lot of food safety guides push people toward discarding anything past its printed date, which is the cautious answer and also, for most dry pantry goods, an unnecessarily wasteful one. The actual risk profile of old flour or old dried oregano is low. The risk profile of expired canned goods with a bulging lid, or oil that smells distinctly off, is a different matter entirely, and that distinction gets lost when every expiration date is treated with equal alarm.
My rule after years of cooking around a strict weeknight schedule, where throwing out food meant throwing out a planned meal: trust your nose over the date for dry goods, and trust visible signs like mold, bulging cans, or a rusted seam over anything else. Those visible and smellable signals catch the real problems. The printed date mostly just tells you when the manufacturer stopped guaranteeing peak flavor, which is a much smaller concern than most labels make it feel like.
Canned and jarred goods deserve the opposite approach
Everything above is about trusting your senses over the printed date, but canned goods flip that advice. A dented can is usually fine, a dent does not mean contamination on its own, but a can that bulges at either end, hisses unusually when opened, or sprays liquid on opening should go straight in the trash without a taste test. Those are signs of gas production inside the can, which points toward the kind of bacterial activity that will not announce itself with an obvious smell the way spoiled fresh food does.
The same caution applies to home-canned or store-bought jarred goods with a button-style lid. If the button is popped up rather than sunken, the seal has failed at some point, and the jar should be treated as compromised regardless of how it smells or looks. This is one of the few places in a pantry where the invisible risk genuinely outweighs what your senses can detect, which is exactly why it deserves more caution than flour or rice ever will.
What storage conditions change about all of this
A pantry near a stove or in direct sunlight ages its contents faster than a cool, dark cabinet does, sometimes by a wide enough margin that the general timelines above shrink considerably. Heat accelerates the oxidation that turns oils rancid and the moisture loss that dries out grains, so a spice rack mounted above a stovetop will lose its potency noticeably faster than the same spices kept in a drawer across the kitchen. If your storage runs warmer than average, trust your nose test a little sooner rather than relying purely on the general timeframes here.
A quick reference before you clean out the shelf
The same instinct applies to the swaps that actually save a weeknight dinner, trust what your senses tell you over what a label assumes about your kitchen. Smell flour and spices before tossing them. Check rice and beans by texture and cook time rather than date. Treat oil with real suspicion once it smells off. And save your actual caution for cans, jars, and anything with visible mold or a broken seal, because that is where the real risk lives, not in a bag of rice that has simply been sitting a little longer than the label suggests.
More in Pantry Staples
Pantry Staples
How to Store Cooking Oil So It Never Tastes Rancid
You reach for the olive oil, pour some into a hot pan and catch a smell like old crayons or stale nuts.
Pantry Staples
How to Store Flour So It Stays Fresh for Months
You open the flour bag for a weekend bake and it smells faintly of crayons, or worse, something small is moving in it.
Pantry Staples
How to Get Rid of Pantry Moths and Keep Them Out
You open a bag of flour and see fine webbing in the corner, or a small grey moth flutters out of the cupboard when you reach...