Years?
I know the 'survivalists' used to stockpile grains in sealed barrels. They would put in some dry ice, and place the cap on. Wait for the dry ice to evaporate, thereby didsplacing the air with CO2. Then seal it up.
Short of that, I'd guess that kept in a sealed container to keep moisture and vermin out, a year? But what's the point? how cheeep is it?