I only have a small freezer so I have never done that. I buy all kinds of grains/beans/flours in bulk and store them in buckets, a few times I used oxygen absorbers but didn’t want to spend the $ any more. I always put a few bay leaves scattered in the bulk foodstuffs - a few on the bottom of the bucket, a few in the middle, and a couple on the top - maybe 6 leaves or so altogether, a pound of bay leaves goes a long way, and when I use up a bucket, I re-use the leaves.
I read a few places that bugs hate bay leaves. In years I’ve only had bugs get one bucket, and it was brown rice for the cats so it didn’t matter. The main reason (IMO) people get bugs is when they buy foods in cardboard cartons like crackers, cereals etc and then store it. I buy only bulk food in 25# bags and shortly after purchase put it in buckets and also large glass jars. I rotate and use stuff up within 2 to 3 years generally. No bugs ever except that one bucket of brown rice.
Here’s another thing you can use -
diatomaceous earth.
It’s a food grade powder that is harmless to people, but is deadly to bugs (anything with an exoskeleton) due to its micro razor sharp properties.
Sprinkle a bit in a storage container and turn it so that it covers all surfaces, then pour in your food stuffs.