Pasta bugs are a PIA. My pantry became infested a few years ago. Had to throw everything out. Such a waste!
Figured out that Barilla pasta was one of the worst brands for this. Worldwide, apparently.
And for some reason, they really liked dry Coleman’s Mustard.
To stop the bugs from hatching, place the items in the freezer for two weeks when you bring them home................
I store everything I can in 1/2 gallon size canning jars.
They aren’t cheap but that way if something does turn out to be infested, it won’t get out and it won’t get into anything else.
There are other canisters which can hermetically seal, too.