Flour and Rice Bugs: How to Prevent & Kill Pests in Your Food Stockpile

Want to stockpile flour, rice, dehydrated fruit, or other dry goods? If you don’t take precautions, you will end up with an insect infestation.

Speaking from experience, these moths and weevils (aka rice and flour bugs) can take over your entire home.

Preventing pantry pests is much easier than dealing with an infestation. Here’s what you need to know about insect-proof food storage methods and what to do if you get an infestation.

What Are Pantry Bugs?

Any insect that gets into your food storage is considered a pantry bug. The two most common are weevils and moths.

  • Weevils: These are small beetles with long snouts. There are over 1,000 types of weevils.
  • Moths: The most common type of pantry moth is the Indianmeal moth (Plodia interpunctella).
Indianmeal moth

Both weevils and moths have similar life cycles.   They start as eggs and then hatch into larvae, which look like small whitish worms. The larvae feed on your dry pantry foods for several days. During this time, the larvae grow and will molt, leaving behind a dry shell. The larvae then enter the pupa (cocoon) stage before emerging as an adult.

weevil life cycle

Weevil life cycle. You are in big trouble once you have adult weevils or moths in your pantry. They can produce hundreds of eggs, which then hatch and produce more eggs. (1, 2)

Where Do Pantry Insects Come From?

I once had some buckwheat in an air-tight mason jar that I forgot about. When I finally went to use the buckwheat, live moths were fluttering around inside the jar.

The container was air-tight, so how did the moths get there?

In some cases, insect infestation occurs when moths or weevils get into your home from the outdoors. But, in most cases, the insect eggs are already in the food when you purchase it.

You can’t see the tiny eggs, and they are harmless to eat. But, if you let the food sit long enough, the eggs will eventually hatch, and the larva will eat your food.

If the infested food isn’t in an air-tight container, you will be in serious trouble. The hatched insects easily escape from paper and plastic packaging and infest all other food in your pantry.

Which Foods Are Prone to Pantry Pests?

rice weevil

Pantry pests will eat virtually any dry food. Some pests prefer certain types of food over others.

For example, I’ve noticed that the moths that infested my pantry preferred to eat flour. By contrast, the weevils seemed to like beans better. Neither of them got into my powdered coconut milk.

I guess even insects don’t like vegan food, haha. 🙂

Regardless of what they prefer, pantry insects will feed on virtually any dry food they can find, including:

How to Prevent Insects in Your Stored Food

Depending on the conditions and type of pantry pest, it can take just a few weeks for the eggs to hatch and larvae to grow. Thus, the most common advice on preventing pantry pests is to “don’t store more food than you can eat in a month.”

This advice doesn’t apply to preppers who want to stockpile emergency food. For long-term storage, the following two methods can prevent pantry insects.

Option 1: Kill Insect Eggs on Dry Foods BEFORE Storing

Since most infestations occur from eggs already inside the food, you need to kill these eggs before putting the food in storage. There are three ways of doing this: microwaving, freezing, and heating.


Microwaving dry foods will kill insect eggs.

How long do you need to microwave food to kill insect eggs? Recommendations vary.

Some studies found that 28 seconds at 500 watts killed eggs of all pantry pest species. However, some other sources recommend microwaving on high for 5 minutes to kill eggs.

Unfortunately, not all foods can be microwaved to kill pests.

  • Foods for Sprouting: If you plan on sprouting your dry foods (such as beans, seeds, etc.), do not microwave them. I did a test at home – I microwaved various beans and seeds and then tried to sprout them. The non-microwaved ones from the same batch sprouted as expected, but none of the microwaved ones sprouted.
  • Cornmeal: Corn scorches easily. I ended up with burn spots in the cornmeal when I tried microwaving it.
  • Whole grains: Research found that microwaving for more than 90 seconds damaged the endosperm of grains, which could mean reduced nutrition.
  • Pasta: Pasta (not corn pasta) can be microwaved to kill insect eggs. The problem is that hot spots can form, and these may leave burnt areas. Don’t microwave too much pasta at once; the center shouldn’t get too hot.

For these reasons, I can only recommend the microwaving method for white rice, flour, and oats. Please let us know in the comments if you have any other advice to add about this! (3, 4, 5, 6)


Heat is another way to kill insect eggs in flour, rice, and dry staples. Put the food on a shallow oven tray and spread it out evenly.

How long do you need to heat the grains? And at what temperature?

Again, sources vary. Some say 120°F for two hours. Others say 140°F for 15 minutes to kill insect eggs. Yet another says 140°F for two hours. (7, 8, 9)

As with microwaving, heating grains/beans/seeds can prevent them from sprouting later on, this isn’t a big deal if you only plan on cooking your dry food storage.

However, I do plan on sprouting some of my dry staples, so I’d have fresh veggies to eat if SHTF during winter when foraging isn’t feasible.


Another way to kill insect eggs in dry foods is to freeze them. This is contingent on you having enough space in your freezer. The good news is that freezing doesn’t affect seeds’ ability to sprout as much as heating does.

How long do you need to freeze foods to kill insect eggs? Recommendations from reputable sources vary from 3 to 7 days at 0F. (10, 11, 12)

I also found one source claiming that freezing only kills larvae and adult insects – not the eggs. They suggest putting infested food in the freezer for 2-3 days, removing it for 24 hours so some eggs can hatch, and then repeating the freezing process. That sounds like an insane hassle!

In my experience and from what other preppers have told me, freezing for a few days does seem to prevent insect infestations. This is anecdotal, as we can’t be sure whether an infestation would have occurred if we didn’t freeze the dry staples before storage.

Important: Let the frozen food come to room temperature before transferring it to buckets or storage containers. Otherwise, condensation will form in the container, and moisture will spoil your food.

Option 2: Use Oxygen Absorbers When Storing

oxygen absorber packets for long term food storage

Insects (including their eggs) require oxygen to survive. (14)  If you remove oxygen from an air-tight storage container, the eggs will never be able to hatch. Oxygen absorbers are a cheap, effective way to remove oxygen.

Oxygen absorbers are little packets that absorb oxygen from the air. If you put an oxygen absorber with your food in an air-tight container, it will be safe from insect pests.

Bonus – oxygen absorbers don’t affect seeds’ ability to sprout! On the contrary, seeds survive better in low/no oxygen environments. If you plan to sprout any of your dry food stockpile, OAs are the best storage method. (15, 16)

You can use oxygen absorbers in mason jars for small amounts of food. For larger quantities of food, I recommend getting Mylar bags. Sealing the bags requires effort, but your food will be safe for years or even decades with this method.


Unproven Methods

I’ve seen recommendations for natural ways to prevent flour and rice bugs, such as putting any of these in your dry food storage:

  • Bay leaves
  • Mint-flavored gum
  • 10d nails
  • Salt

None of these methods are proven to work. While it might be okay to try natural methods with dry foods you plan to rotate through quickly; I wouldn’t risk it with large stockpiles.

How to Get Rid of Moths and Weevils in Your Food Stockpile

beans infested by weevils

Once you have moths or weevils in your dry staples, they are tough to eliminate. I’ve experienced this firsthand, and (embarrassingly) it’s happened more than once.

Here’s how to get rid of the pantry pests.

Step 1: Contain the Infestation

Hopefully, your pest infestation is limited to just one container of food. For example, if you stored rice in an air-tight container, you might see bugs inside the container but not in the rest of your pantry.

In this case, you must ensure the insects don’t escape. Do NOT open the infested container: The moths/weevils will fly out, and suddenly, your entire pantry is open to infestation.

Stick the entire container in the freezer for a few days to kill the insects inside. Or, if the container is microwave safe, you can microwave it on high.

Step 2: Protect Unaffected Foods

Even if you can’t see any signs of infestation (such as silk webbing or live larvae), your other dry foods could be infested.

Any food stored with less-than-ideal methods (such as in boxes, bags, buckets, or recycled jars) should be treated. As discussed earlier, you can deep freeze, microwave, or heat the food to kill insects and their eggs.

I recommend freezing the foods until you are sure the infestation is gone. Or, use this as a lesson and transfer the food to more reliable storage methods, such as sealed Mylar bags or mason jars with oxygen absorbers.

Step 3: Decide Whether You Want to Throw Away the Infested Food

Yes, I know it sounds gross, but eating (cooked) moths and weevils is perfectly safe. This includes their eggs, larvae, pupae, cocoons, silk, and adults. The caveat is that you want to cook the food first.

Read more about What Happens If You Eat Weevils in Food

If you are okay eating bug-infested food:

Then, cook, heat, or freeze the food to kill the pests and their eggs. This will prevent the infestation from spreading. Be careful that live adults don’t escape while you are treating the food. If possible, freeze the entire affected container without opening it.

*If you soak beans or larger grains, moth and weevil bodies will float to the top and can be removed. Some cocoons and larvae will still be in the food, but they won’t be visible and thus less gross to eat.

If you don’t want to eat infested food:

Then you’ll need to toss it. It sucks to waste food. Alternatively, it can be used as bird feed. Make sure no live insects escape when dumping the food into the trash. They will easily escape your trash can, and the infestation will start again.

Step 4: Clean the Heck Out of Your Home

Once you’ve gotten the food out, you must thoroughly clean your home of weevils and moths. Take EVERYTHING out of the pantry – including canned goods and jars – and wipe them down. Then vacuum the shelves and wipe those down, too.

Some people successfully use natural cleansers like vinegar and water to get rid of pantry insects. Others recommend household insecticides meant specifically for pantry pests.

It’s often not enough to clean your pantry. You may have to clean your entire kitchen or areas around your pantry.

Moths tend to be worse than weevils because they can fly all over your home. Weevils don’t make it as far, but don’t be surprised if you find them in your kitchen cabinets. In a worst-case scenario, you might need to put all your dry staples in the freezer or toss them, have an exterminator come, and leave your home until the fumes settle.

Remember, it only takes ONE moth or weevil to restart an infestation. So, you must be thorough in cleaning out your pantry. Or get used to the idea of eating insects in your dry foods!

Have you had an insect infestation in your food storage? Let us know how you dealt with it in the comments section below.


Want to store food but confused about how?

Get the eBook. Instant Download. No Ads. Now With 50% OFF!

how to store ebook image

You’ll learn the 7 main food storage methods and get detailed instructions for 30+ different staples.

This is the information you need to store food with confidence.

Learn More

Leave a comment

  1. I brought home some bags of dried beans from a well known grocery store. Weeks later I found moth eggs in the bags. Can I rinse the eggs off of the beans and still cook the beans and eat them?

    • You can rinse the eggs off but there will definitely be eggs — and probably little larvae — inside the beans too. It’s completely safe to eat these (just some extra protein :)). Though a lot of people find it gross. When this happens to me, I usually make a recipe that “hides” the beans so I don’t have to see the larvae. Like blending the beans into a puree and putting it into savory pancakes or bread dough.

      More on that here: https://www.primalsurvivor.net/what-happens-if-you-eat-weevils-in-food/

  2. Thank you for confirming that the bugs won’t kill us. Every other site was like throw it all away. I recently found mites in a bucket of rolled oats I put up some time ago with oxygen absorbers and a Gamma lid. I will have to do it in batches but sifted the oats and put them in the oven @250 for about 30 minutes.

  3. I like to vacuum seal my dry staples/rations for long term storage. Even if they are already in a sealed package. I have a couple reasons for doing this…1- b/c pantry pests (moths) can n will chew a hole through plastics, celephane, n waxed paper packaging. Not sure when in their cycle this happens but i assure you they chew perfect round aprox 1mm size holes in said above. 2- i will dust the exterior of the manufacturers package/ inside the secondary-vacuum-seal bag befor vacuume sealing. This adds a layer of protection to stop any pest should any’ve taken harbor before storing. The vac-sesl bags are extra thick-called bone-breaker bags. Coz they will break raw meat bones before being punctured by them from vac sealing….

    • I’ll have to check out those Bone- Breaker bags. Because moths can definitely chew through regular vacuum sealer bags just like they can chew through plastic packaging!

  4. I personally have never ended up with moths but I HAVE had weevils a couple of times in my life (50yrs young, LOL) and what I have found worked was going through the pantry/cupboards I kept the food in and removed anything that was infested (of course) then I vacuumed out any possible crumbs etc that may be in there (kids often leave open containers and aren’t very careful about not leaving crumbs in the cupboards) and then wiped the shelves and any uncontaminated food containers down with hot soapy water with bleach in it both to kill any remaining eggs etc and it will remove any bacteria etc that could also be on the outside of the food container (I live in the country and have had mice get into the house a couple of times, wiping everything down helped take care of the “ick” factor as well… LOL!). I used more than the recommended dilution of bleach just to be safe and made sure it was very dry before returning all good food to the cupboard. I find using a stronger bleach mixture not only removes any germs on the containers/shelves, but it seems to help discourage new infestations as well. After noticing this over the years I now use bleach every time I clean out the pantry (usually once or twice a year for spring/fall cleaning) and I haven’t had an infestation since. Of course you still need to be careful when storing your food but cleaning with bleach really seemed to help. Of course make sure there is no way that you can contaminate your food with the bleach!!!! Although I used a stronger mixture than the bottle says is necessary I didn’t use TOO much either as you don’t want to breathe the fumes, contaminate your food or even have the odor absorbed by things such as flour although that shouldn’t happen if it’s sealed properly anyway but just a heads up in case you have open boxes of cookies or crackers etc. that people especially kids may eat and become sick!!!! I will say use common sense although it doesn’t seem that “common” anymore!!

  5. Another way to kill or just put in the food just in case is DE Diatomaceous Earth. It stops all those little bugs in an hour after you put it in. And it is safe for us to eat!! Big plus! You can usually find it online or at a garden center. Just make sure it is food grade. It is just a dust that scratches the carapace or outside of the insect and it dries out.

  6. Thank You ♥️ This is a great Help! We live in the country! 45 minutes drive One way to a good food store! I try to buy enough to last for a few weeks or months! We are seniors I’m the only person who shops.My husband is disabled and I’m His caregiver! I like having plenty of food on hand! When I was younger the kids and then the grandkids camped a lot. We ate bugs When camping , that we found in food! The kids loved it, and had a fun story to tell at school.Thank You, Rachel in Toluca NC

  7. Thanks! It is good to know you could eat the bugs if you had to. The wise see the trouble coming and prepare. Keep your faith in God. Never give up!

  8. Should ALL dry goods be frozen or “treated” before stored? I’m just trying to figure out which foods need to be treated for possible insect eggs. Thank you!

    • -If you are packaging food with oxygen absorbers (OAs), then you don’t need to treat for insects. Insect eggs won’t hatch without oxygen.
      -If you are packaging without OAs, then you do need to treat for insects.
      -I personally have never had problems with processed dry goods (pasta). So you might be able to skip treatment for these. But definitely treat oats, flour, rice, whole grains, etc. Insects love them. Keep enough of them around for a long time and it’s almost inevitable that you’ll get an infestation.

  9. I plan to store white flour in Mylar bags with O2 absorbers, then in food safe buckets. Do I put the flour in the Mylar bags with the O2 absorber then freeze? Or freeze before the Mylar bag. Thanks so much!

    • If using OAs, then you don’t need to freezer or treat for insects. The insect eggs can’t hatch without oxygen. That’s just one more reason I love using OAs for long term food storage.

  10. I’ve read that using oxygen absorbers in mylar or other truly sealed containers keeps pest eggs from hatching (even if it doesn’t kill them.) So then, why does vacuum sealing in mason jars do the same thing? Vac sealing removes the air (which includes the oxygen) from the sealed container, which should prevent eggs from hatching, right?
    O2 absorbers and mylar bags are expensive, but I have an old vac sealer that still works and mason jars that I want to seal dry goods in for long-term storage. I was going to dry-can them, but then read that heating the stuff in the oven, while it does kill insect eggs, also brings the 10% moisture content remaining in the dry goods up to the surface, which can cause the foods to go bad even if sealed in jars.
    For now, I will vac-seal in jars, then put jars in the freezer for 4 days or more before putting them on the shelves for long term storage. But I’d love to hear your thoughts on whether vac-sealing removes enough oxygen to keep the eggs from hatching without also using pricey O2 absorbers. Thanks!

    • The issue is that vacuum sealing bags are not actually 100% air tight. They eventually allow air inside. A vacuum sealer also can’t remove air INSIDE the food (which is actually a lot with some foods, like with beans). So, oxygen absorbers are the only reliable way to ensure insect eggs don’t hatch. *YOur idea about freezing the food to kill insects is good. However, I’d put them in the freezer BEFORE you vaccuum seal. Otherwise condensation could form in the bags after they are removed from the freezer. Freezing makes the moisture inside foods shift around.

    • It usually happens in the food processsing plant. It could even happen in the fields: the insects laying eggs on the plant and they don’t hatch until weeks later when they are in your home. It would actually be pretty amazing if it weren’t so annoying!

  11. My mother ( blind) lived in senior apartments that had all of the cook stove fans connected in the walls.
    The neighbor brought home cat food from the food bank that turned out to have asian pantry moths in it. They spread through the vent system. Pretty soon we had moths flying and larva crawling on the ceiling and walls. They love the glue that seals the boxes of food, paper goods and even the paper on canned goods. I had to throw out bags and bags of stuff and then wipe down EVERYTHING with bleach, ceilings shelves walls. They love to lay eggs under the door frames. The pantry pest traps stop this from happening.

  12. Thank you for the article. It has more info that I ever knew. My daughter brought home some bagged items from a bulk food store and eventually I saw moths in the cart drawers. I threw the cart outside, she bagged all the food for garbage and left that outside, cleaned the cart thoroughly and brought it back in. Since that time, I started seeing moths mostly in the area where the cart was, the odd worm crawling up the walls. I was killing an average of 12 moths a day, which doesn’t sound bad until you realize that’s over 4,300 per year. She’s been gone for 7 years and the odd time I will see one or two moths. Once I kill them, one or two more show up. I assumed they hibernate and hatch at different times or seasons because I have not seen any in or around any more foods. It has been a nightmare. I found your link when searching for info on freezing new bags of flour. I was told if you do that it prevents weevils. I couldn’t remember if what I heard was 24 or 48 hours. I am so glad to hear that eating these things can’t harm you. I just wish I had the stomach for the bugs people eat on reality shows like Fear Factor. lol Again, many thanks!

    • Get Pantry moth traps. They are open ended sticky boxes with pheromone attractant. Catches adults stops the cycle. I think Home Depot sold them.

    • Glad you found it helpful 🙂 As for freezing, there is no clear consensus. Some (reliable) sources say 24 hours. Others say 7 days!

      • I decided to test the theory of freezing. I froze rice outside over winter. (Average temperatures are -20c to -45c) for 4 months. Come spring, there were insects growing in the container. Freezing did not work. I find the only solution is an oxygen free environment, be it vacuum sealing or O2 absorbers.

        • Huh. That’s crazy. But, then again, insects do survive the winter by going into a hibernation mode. I still have some faith in freezing to kill eggs though: I’ve put moth-infested grains in the freezer and, when I removed them weeks later, no new moths hatched. But I agree — O2 absorbers are the sure-fire way to go!

          • Yes I really got mad when i lost one bag of maize. Now I use technology of suffocation bags developed by Purdue university. It is wonderful as long as there are no rodents. In my case I keep a fierce cat.

    • Clean with vinegar. Everything. Shelves walls canned goods. Everything!! Then put bay leaves out on every shelf and drawer. This has worked for me about 3 years and haven’t seen any


Leave a Comment