It is a fact that bugs in all of their life cycles can be harmful to your stored food sources. They are one of the true enemies  of your food supply and can usually be avoided by properly storing food  for long-term use. But there are times when they find a way to penetrate your food supply. While these infestations may prevent humans from consuming it, take comfort in knowing that all is not lost! But first, the facts!
Pantry pests damage food by contaminating it with their bodies and their by-products. According to an integrated pest management system, nearly all dried food products are susceptible to insect infestation, including cereal products (grains, oats, cornmeal, rice, spaghetti, crackers, and cookies); seeds such as dried beans and popcorn; nuts; chocolate; raisins and other dried fruits; spices; powdered milk; tea; and cured meats.
The Usual Suspects
- The larval stage of the Indianmeal moth produces frass (excrement) and webbing, and some beetle larvae produce secretions that give food a disagreeable odor and taste.
- Setae (hairs) from the warehouse beetle can irritate the mouth, throat, and stomach of people who eat infested products.
- In addition, pantry pests might introduce microbes into the food that could produce mycotoxins (highly carcinogenic compounds), especially if the food is stored in warm, humid conditions.
In The Prepper’s Cookbook , it was emphasized that insects are most likely to infest food products that have been opened but are also capable of penetrating unopened paper, thin cardboard, and plastic, foil, or cellophane-wrapped packages. They may chew their way into packages or crawl in through folds and seams. Insects within an infested package begin multiplying and can spread to other stored foods not only in the same area but in other rooms in a home. All stages (egg, larva, pupa, and adult) may be present simultaneously in infested products. Source 
That said, there are times that even though all precautions are taken at preserving your food supply, sometimes bug infestations happen. Here is a bold new approach to making the best of a bad situation.
A Bold New Approach to Feeding Livestock
In an article on the subject, researchers believe that certain bug infested grains and foods can be fed to livestock for added nutrition. While these infested foods may be less palatable in certain circumstances, they can be fed to livestock. Dry grains and cereals are already given to chickens, goats, pigs and cattle as a nutritional supplement and many livestock animals gravitate toward ingesting bugs – goats, chickens, pigs and even cows.
Infested dry beans can also be incorporated into livestock’s diet. Edible beans  (e.g. navy, pinto, kidney) that are shrunken, broken and/or discolored will not make the grade for human consumption and may make their way into cattle rations for added protein.
A new article in the journal of Animal Feed Science and Technology  notes that insects literally breed like flies and are highly efficient (because they are cold-blooded) at converting their feed into body mass. Though it may need to be supplemented with calcium and other nutrients, that body mass is rich in the proteins and fats animals need. But the best part—questions of squeamishness aside—is that insects can thrive on manure and other waste.
The article reviews the state of research on livestock use of locusts, grasshoppers, crickets, black soldier fly larvae, housefly maggots, mealworms, and silkworms. Each has advantages and disadvantages in different habitats and for different species, but together they offer a battery of alternatives to conventional soybean and fishmeal feed.
Black soldier fly larvae are already commonly sold as pet food and fish bait. Studies suggest that pigs and poultry could do as well or better on a larvae-based feed as on soybean and fishmeal feeds. The larvae could also be a practical alternative on fish farms, particularly where customers object to feeding fish other fish. For some fish and for poultry, eating insects may also be a lot closer to their natural diet than are conventional livestock feeds.
Note: this is not to be confused with feeding livestock moldy food. Doing so can introduce toxins to the livestock that can make them ill and possibly die. Moreover, molded feed contains fungal spores that, if inhaled, can cause a myriad of health issues such as respiratory allergies, or a type of pneumonia that prevents oxygen from getting into the bloodstream.
Why This Approach is Brilliant!
Farmers raising livestock for meat have been on the look out for ways to introduce for nutrients to the animals diets and cut down on feed costs. This sustainable approach could be the answer they have been looking for. A meal ground from infested grains and cereals can be fed to livestock and will drastically cut down on feed costs. As well, one can consider growing fodder  to further supplement the livestock diet.
Using this “insect meal” is also beneficial in an organic garden and add needed nutrients to the soil. This promotes a more sustainable gardening method.
To ensure a healthy transition into this alternative food source, research what types of food pests could be added to your livestock’s diet beforehand. This could be a great way to add additional nutrition to the livestock’s diet and make better use of the food you would otherwise throw away.
According to Science Magazine , “regulatory agencies are beginning to weigh the benefits against potential safety risks, including the possibility that insects might accumulate environmental toxins or even transmit diseases to the farm animals that eat them. On 8 October, the European Food Safety Authority (EFSA) in Parma, Italy, released its first report on the risks of using insects as food and animal feed. It concluded that the risks depend on the insect species used—and that more studies like PROteINSECT are needed before livestock or fish are switched to this new diet. But in other countries, the brave new world of industrial-scale insect farming is already on view.”