Some pantry staples really do last for years, sometimes with no defined end at all. But that only holds if they’re sealed, dry, and stored the way food scientists mean when they say “indefinitely.” These seven foods clear that bar. What changes for each one, and what doesn’t, is worth knowing before you toss something that’s still good.

Salt
Salt is a mineral, not a living thing, so it cannot spoil. Its low moisture content makes it hostile to bacteria, which is why cooks have used salt to preserve meat for thousands of years. USDA’s food safety guide notes salt has cured food since before canning existed. Keep it dry and sealed, and a decade-old container is just as good as new.
Granulated Sugar
Sugar works the same way salt does. It pulls moisture out of anything nearby, starving bacteria of what they need to grow. Ohio State Extension lists granulated sugar as a food that lasts indefinitely. The only real enemy is humidity: if you leave sugar open in a damp kitchen, it will clump, but clumped sugar is still safe to use.
Honey
Honey’s low moisture, acidic pH, and a trace of natural hydrogen peroxide make it one of the most microbially hostile foods there is. The National Honey Board notes sealed honey can remain stable for decades. What actually changes is texture: honey crystallizes over time, turning thick and cloudy. That is not spoilage. Warm the jar in hot water and stir, and it goes back to normal.

White Vinegar
Vinegar’s high acidity makes it inhospitable to spoilage bacteria. Iowa State Extension notes distilled white vinegar stays virtually unchanged for years once sealed, citing the Vinegar Institute’s research. Other vinegars, like apple cider or balsamic, are also long-lasting, though you may notice color and flavor change after a couple of years. Cloudiness in an older bottle is harmless.
Unsweetened Cocoa Powder
Cocoa powder is only about 3 percent water by weight, according to USDA nutrition data, which leaves little for bacteria to use even though the powder does contain real cocoa fat. Iowa State Extension notes that an unopened package of unsweetened cocoa powder has an indefinite shelf life. It may lose potency over the years. Once opened, it holds its best flavor for around three years.
Cornstarch
Cornstarch is a dry, inert starch powder. A USDA technical review describes it as chemically stable under normal conditions and uses, with no dangerous reactions reported. NDSU Extension recommends using unopened cornstarch within 18 to 24 months for best quality, and 18 months once opened. Keep it dry and tightly covered to get the most out of that window.
White Rice
White rice is dried to a moisture level that keeps bacteria from growing, which is why it survives for years sealed. USDA’s shelf-stable chart lists a two-year window for best quality, not an indefinite one, so treat rice past that point as safe but not necessarily at its best. You may notice it takes longer to cook or has a little less flavor.

The Bottom Line
None of this is a reason to skip real spoilage checks. Mold, a sour or off smell, or signs of pests mean something should go, no matter what’s on the label. But absence of those signs is not proof of safety on its own; it just means a food has passed the most obvious test. For these seven staples specifically, sealed and dry storage is doing most of the work, and the date on the package is mostly measuring flavor, not risk.