Last year i had weevils. They were inside a bag of flour but had infested the entire cupboard.
It took weeks to get rid of them properly. Every time i thought i'd got the last one, i would find another. The cupboard was kept empty and i kept spraying it, so where they were hiding i don't know.
Luckily i stopped them spreading to my other cupboards. I wish i'd known about DE then.
What i do now when i buy flour is put it in the freezer for 24 hours to kill any eggs that might be in the flour.