There are some important things for any aquarist to know about nutrition. These apply to fish food as well as food for other pets and for humans. There are five main factors that remove or destroy nutrients in food: heat, light, water, oxygen, and time. Minimizing the effects of these factors will keep fish food as nutritious as possible for as long as possible.
To protect food from heat simply keep it at room temperature or cooler. For long term storage it can be kept in the refrigerator or freezer. It can be very cost effective to buy food in bulk, store most of it in the freezer, and only use a small container to store small amounts for immediate use near the aquarium. Do not keep food on top of the light fixture. This is a source of heat and keeping the food on it all of the time is a good way to gently bake away some of the nutrients.
Light can also destroy some of the nutrients in fish food. This is one reason why most containers of food are completely opaque or have only a small window to view the food. Pellets are better protected because only the nutrients on the surface of each pellet are exposed to light, the rest of the food being well protected. Some brands may use packaging that allows for more visibility of the food with pellets. Flakes are particularly vulnerable to light since every bit of the food is exposed to light. Most packaging will keep the food well protected from light.
Water can remove nutrition, particularly water soluble vitamins. This is why presoaking foods before feeding them to the fish is not a good idea. Again flakes are particularly vulnerable, but in most situations when pellets are soaked they are soaked completely through under the impression that if this is not done the pellet may dangerously expand in the fish’s stomach. This is not true. Pellets do not expand significantly in water, and if they did the fish could simply regurgitate some of the food. Water vapor in the air can also remove some of the nutrition. This is one reason why it is so important to store food in a tightly sealing container.
Oxygen also degrades some of the nutrition. This is the main reason why a tightly sealing container to store the food in is so important. This is also why the same is true of human foods and why some foods are packaged with pure nitrogen instead of just air (like chips). Do not leave fish food containers open and the food should be well protected from oxygen. If there is any doubt about how well a container seals (such as some of the resealable pouched foods) using a tightly sealing container made for human food could be a good alternative.
The final factor is time itself. Discard any food that is discovered at a later time (such as when cleaning out the aquarium’s stand). Buy food with the latest expiration date. This should be the product behind the others on the shelf if the store is rotating their stock properly when new product is put out (which is in their best interest so it won’t expire and become a loss for them) but is not always the case since the average employee does not care and has no real interest. This is especially true of products that hang on a peg instead of simply being placed on the shelf because they require more effort to rotate. Buy food in quantities that will be used in a reasonable amount of time, ideally less than a year. When buying in bulk most of it should be stored in the freezer to keep it fresher longer, and again should be used within a year.