I vacuum seal entire bags of flour or cornmeal. Vacuum sealing does no harm to bread flour or cake flour, but causes all-purpose flour to clump. The flours will keep bug free for a very long time. I recently opened the last bag of bread flour that was purchased in Panama
in early 2008 and it is still just fine. Normally I would not keep something that long but this bag got overlooked in the bottom of a deep storage
locker. For all-purpose flour, I stop the vacuum process before the bag is completely sucked tight. This causes a looser bag but keeps the flour quite well.
I keep a large Lock'n'Lock canister for opened all-purpose flour and another one for bread flour. And a smaller one for corn meal. Never had a bug problem.
When sealing the entire bags of flour, I use the large rolls of plastic and cut to length desired. Make the bag a foot or more longer than originally needed to hold a large bag of flour. When you remove that bag of flour save the plastic bag and re-use it. By making the original plastic bag much longer than needed you can re-use it several times. In the long run it saves a LOT on the amount of plastic wasted. You can re-use the vacuum seal plastic bags as long as you have not stored meat or cheese. Those must be discarded.