For example, all-purpose flour lasts 6–8 months on the shelf but up to 1 year if refrigerated and 2 years if frozen (7). If you put your flour in the fridge, be sure to keep it away from moisture and water to prevent mold. This is best done by sealing it in an airtight container, such as a plastic bag or food bin (8).