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

Last Updated: October 17, 2021

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.

It’s a lot easier to prevent pantry pests than deal 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 which 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 go into the pupa stage (cocoon) before emerging as an adult.

weevil life cycle

Weevil life cycle. Once you have adult weevils or moths in your pantry, you are in big trouble. They can produce hundreds of eggs, which then hatch and go on to 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, then you will be in serious trouble.  The hatched insects easily escape from paper and plastic packaging and then 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 which 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:

  • Flour, cornmeal, and cake mixes
  • Rice and whole grains
  • Beans and legumes
  • Breakfast cereals
  • Pasta
  • Cookies and crackers
  • Spices and herbs
  • Dried fruit
  • Chocolate
  • Nuts
  • Tea
  • Powdered milk
  • Pet food
  • Tobacco

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, and 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, 13)

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 and then 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 any buckets or storage containers.  Otherwise, condensation will form in the container, and your food will spoil due to moisture.

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)

For small amounts of food, you can use oxygen absorbers in mason jars.  For larger quantities of food, I recommend getting Mylar bags.  It does take some effort to seal the bags, 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 on rotating through quickly, I wouldn’t risk it with large stockpiles of food.

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 get rid of. 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’ll need to make sure 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 talked about in the earlier section, 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 it is perfectly safe to eat (cooked) moths and weevils.  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 either 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.  There will still be some cocoons and larvae in the food, but it 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 get out of your trash can, and the infestation will start all over again.

Step 4: Clean the Heck Out of Your Home

Once you’ve gotten the food out, you will need to 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 then wipe those down too.

Some people have success using 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 just 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 of 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.


Leave a comment

  1. 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!

  2. 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.

    • 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!

  3. 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.


Leave a Comment