If you're a baker, there's nothing worse than going to your pantry and finding rancid flour. When you open bags of flour at home, transfer the contents into an airtight container immediately. You can also store the flour in the freezer. According to the Wheat Foods Council, flour can last indefinitely if frozen. In the fridge, it can stay fresh for two years.