Keeping the food covered is not enough. The food needs to be stored in a sealed container... And free of moth larva in the first place. Putting new food into a freezer for a couple of days (to kill the larva) and then storing it in a sealed plastic container should do the trick...
our war on moths. and it may be a long post.
one time we had been moth free, and the money was tight and i bought bulk seeds. and it went down hill from there.
we had some peanuts in a tupperware container, that gradually got shoved to the back of the pantry shelf. that's where we discovered the mess of them. some how and we never figured out how, the moths got into the peanuts, built the webs, made the larva, which we called worms, and as they hatched, flew out into the house.
just prior to that, we could not walk threw the house without seeing them, and killing them, they are so easy to kill.
we started to find them in the kids cereal boxes, the sugar, flour, etc. all in tupperware. so we threw out ANYTHING like that. and started putting bay leaves in the back of the cabinets. they don't like the smell i guess. we bought seed moth traps, that when opened up, look like a triangle. they would be covered in 2 days and a new one put up.
we froze the seeds, used the traps and bay leaves and cut the population almost gone. then we had a flare up again. too many again. found out when i took the covers off the sleep cages to wash them, that the back of the covers which we didn't see, the worms were in the material. washer killed them. finally we got down to just a few.
so put the bay leaves in the cabinets, put fresh ones in every 2 weeks. freeze the seeds and get the triangular seed traps. hope this helps.