How to Get Rid of Pantry Moths and Keep Them Out
You open a bag of flour and see fine webbing in the corner, or a small grey moth flutters out of the cupboard when you reach for the rice.

You open a bag of flour and see fine webbing in the corner, or a small grey moth flutters out of the cupboard when you reach for the rice. Pantry moths are one of the most common kitchen pests, and once you have seen one, there are almost always more you have not found yet.
The good news is that you can clear an infestation in an afternoon and keep it from coming back with a few cheap habits. This guide walks through finding the source, cleaning properly, storing food so moths cannot get in, and the popular fixes that waste your time.
How to recognise pantry moths
The usual culprit is the Indian meal moth. Adults are about 1 cm long with wings that are pale grey near the body and coppery brown at the tips. They fly in a slow, zigzag pattern and tend to rest on ceilings and the upper walls of cupboards.
The moths themselves do not eat your food. The larvae do. Look for:
- Small cream coloured caterpillars, up to about 1.2 cm long, often with a darker head.
- Silky webbing in flour, oats, cereal or along the folds of packaging.
- Clumped grains or flour that sticks together in strings.
- Tiny cocoons in the corners of shelves, under shelf lips or in the screw holes of cupboard hinges.
A single female can lay 100 to 300 eggs, and in a warm kitchen the full life cycle takes as little as four to six weeks. That is why one stray moth in October can become a cupboard full by Christmas.
Find the source before you clean anything
Most infestations start from one infested product brought home from the shop. Eggs and young larvae are almost invisible and can survive inside a sealed paper or thin plastic bag. Finding that one product matters more than any spray or trap.
Take everything out of the affected cupboard and the cupboards next to it. Check these items first, because they are the most common hosts:
- Flour, cornmeal and baking mixes
- Rolled oats, muesli and breakfast cereals
- Rice, especially brown rice
- Dried fruit, nuts and seeds
- Pet food and bird seed, which people often forget
- Dried chillies, paprika and other ground spices
- Chocolate, cocoa powder and dried pasta
Pour suspect dry goods into a clear bowl in good light. If you see webbing or larvae, bag it and put it straight in an outdoor bin. Do not leave it in the kitchen trash overnight.
A step by step clean that actually works
Once the infested food is gone, you need to remove eggs and cocoons hiding in the cupboard itself. This takes about 45 minutes for a standard pantry.
- Vacuum every surface. Use the crevice tool along shelf edges, corners, hinge holes and the gap under the bottom shelf. Empty the vacuum outside afterwards.
- Wash shelves with hot soapy water. Pay attention to the underside of shelves and the top of the cupboard, where cocoons often sit.
- Wipe with a vinegar solution. Mix one part white vinegar with one part water. It does not kill eggs on its own, but it removes residue and the scent trails larvae follow.
- Let everything dry fully. Leave the doors open for an hour. Damp shelves encourage mould and attract other pests.
- Treat food you want to keep. Put unopened or clean looking dry goods in the freezer at 0 F (minus 18 C) for at least four days. This kills any eggs you could not see.
Wash any reusable containers that held infested food, including the lids and rubber seals, before you refill them.
Storing dry goods so moths cannot get in
Larvae can chew through paper, cardboard and thin plastic bags. Clipping the top of a flour bag closed does not stop them. Real protection means airtight containers with a seal.
| Container | Moth proof? | Rough cost |
|---|---|---|
| Original paper or cardboard packaging | No | Free |
| Zip top freezer bag | Partly, larvae can chew thin plastic | $0.20 each |
| Glass jar with a rubber seal and clamp lid | Yes | $5 to $10 per jar |
| Hard plastic canister with a silicone gasket | Yes | $20 to $40 for a set of six |
You do not need to buy a matching set. Washed out glass jars from pasta sauce or pickles with screw lids work well for spices and smaller amounts. We cover which seals hold up in daily use in our guide to meal prep containers that keep food fresh.
A few habits help as well. Buy flour and oats in amounts you will use within two to three months. Write the purchase date on each container. Use older stock first. And if you buy in bulk, freeze new bags for four days before decanting them into the cupboard.
Why bay leaves and pheromone traps will not solve it
The most shared tip online is to tuck bay leaves into your flour and rice. Some people swear by it, but there is little evidence it repels pantry moths in any meaningful way. Larvae have been found happily living in jars with bay leaves in them. Use bay leaves for cooking, not for pest control.
Pheromone traps are more useful, but they are misunderstood. They attract and catch adult males only. Females keep laying eggs, and the larvae keep eating your food. A trap that fills up with moths is telling you there is still a source somewhere. It is not fixing the problem.
Where traps do earn their place is as a monitor. Put one sticky trap on the top shelf after you have cleaned, and check it once a week. No moths for six to eight weeks means you are clear. A new catch means it is time to go back through your dry goods.
Avoid insecticide sprays inside food cupboards. They are not needed if you remove the source, and you do not want residue near open food.
Keeping your pantry moth free long term
Prevention is mostly about what you bring home and how quickly you use it. A few minutes a month is enough:
- Check bags of flour, rice and nuts at the shop for holes, webbing or clumps.
- Decant dry goods into sealed containers on the day you buy them.
- Do a quick shelf check once a month, looking at corners and lids.
- Store pet food and bird seed in sealed bins, away from human food.
- Keep the cupboard cool and dry, away from the oven or dishwasher vent where possible.
A tidy, well stocked pantry is also easier to cook from. If you are rebuilding yours after a clear out, our list of pantry staples that save a bad cooking day is a good place to start, and you will find more storage ideas in the pantry staples section.
Frequently asked questions
Can you eat flour that had pantry moths in it?
Accidentally eating a few larvae or eggs is not known to be harmful, but the flour is contaminated with webbing and droppings and usually tastes stale. Throw out anything with visible larvae or webbing. Sifting does not remove eggs, so it is not worth the risk to your other food.
How long does it take to get rid of pantry moths?
The main clean takes an afternoon, but it is wise to monitor for six to eight weeks afterwards. That covers at least one full life cycle, so any eggs you missed will have hatched and shown up on a trap. If nothing appears in that time, you are clear.
Where do pantry moths come from in a clean kitchen?
Almost always from a product you bought. Eggs can be present in grains, nuts or dried fruit straight from the factory or warehouse. A clean kitchen does not prevent that, which is why sealed storage and freezing new bulk purchases matter more than how often you wipe the shelves.
More in Pantry Staples
Pantry Staples
How to Store Cooking Oil So It Never Tastes Rancid
You reach for the olive oil, pour some into a hot pan and catch a smell like old crayons or stale nuts.
Pantry Staples
How to Store Flour So It Stays Fresh for Months
You open the flour bag for a weekend bake and it smells faintly of crayons, or worse, something small is moving in it.
Pantry Staples
Canned vs Dried Beans and When Each One Is Worth It
You stand in the aisle holding a 400 g can of chickpeas in one hand and a 500 g bag of dried ones in the other, and you cannot...