If you find small bugs in your flour, from a food safety and hygiene perspective, the recommendation is: do not continue to eat it.
The reasons are as follows: flour infested by flour beetles (such as the red flour beetle Tribolium castaneum, confused flour beetle Tribolium confusum) or Indian meal moth larvae has been contaminated with insect body parts, insect feces (containing metabolic wastes like uric acid), exuviae (shed larval skins), and microorganisms.
Uric acid and ammoniacal compounds in the feces give the flour a musty and bitter taste â even if you pick out the bugs, the flavor and quality of the flour have already declined.
Insect body parts can be ground into fine powder in the flour and cannot be completely removed by eye â especially the larvae and adults of Tribolium beetles, which secrete benzoquinone (a defensive chemical) that gives the flour a pungent "chemical" odor.
For a small quantity of infested flour: discard the whole bag immediately into an outdoor trash bin (do not just pick out the bugs and continue using it), clean the pantry thoroughly, and vacuum all crevices.
For large quantities of stored dry goods â if you are a "no food waste" person, picking out the bugs and using the compromised flour for fermented dough products, the high-temperature baking process will inactivate bacteria and insect body fragments â but this is not a recommended food safety practice.
Prevention is always much easier than dealing with "can I still eat it" â airtight storage and regular inspection are the best strategies.