I haven't seen a bug in my pantry in many years. I probably won't start freezing, as I never have any freezer room either - but the bay leaf thing might work. I will however, start storing in an airtight container. Those boxes are seriously just open to the air underneath the glued-together flaps.
NO! saying check to see if bugs!
[ok, I'm old gal and been poor more than once, so I do things lots of younger folks wouldn't do ... if do have few bugs, and low on $$, CAN pour box out in paper plate, pick out bugs (usually they're dead anyway) and cook. Anything boiled 20 minutes or so is pretty harmless -- in fact, "they" tell ya to boil canned food 20 min to kill germs in it. Never killed us for mom to do, or me to do ... heck, never even got sick! -- You might not want to do, BUT it's probably done more often than you think!]