There are many pests of stored foods, two of the most common are beetle and moth larvae's. Also beneficals such as predators of these kitchen pests are known to inhabit stored foods as well. Cereal boxes are a favorite place for the Angoumois Grain Moth but also various types of grains, dog food, flour and almost anything edible. The fact that the problem went from local pantry to all over the house suggests that you actually spread them by throwing away a lot of grains, suggests that you probably threw their eggs around and with any luck they made it through the winter to spring. Chemical controls are not healthy in the long term.
Organic controls work better and last longer.
Causes A particularly wet spring will encourage larger populations following spring Infested stored food due to improper packaging and transport. Could be also at factory. A clean up of all stored foods and the immediate area. Place new un opened packages into sealed containers if possible. Try storing in glass jars.