A simple rule to remind once again: less moisture, less possibility of softening and bacterial growth. Dry ingredients, including white flour, baking powder, spices, and sugar, can last for 1-2 months after their suggested expiration date. Salt is incredibly impressive—it never grows bacteria, and can reach almost infinite shelf life for that matter!