Table of Contents
You reach for the flour and the surface seems to move, or there is fine webbing across the top of the cereal. Pantry pests – the beetles, weevils, moths and booklice that get into stored food – are rarely a sign of a dirty kitchen. They usually arrive inside something you bought, in damaged packaging or from an open bulk bin, and then spread to everything else that is open. You cannot spray your way out of them: household insecticides do nothing to insects sealed inside a bag of flour, and spraying near food is worse than the pests. The fix is mechanical. Find what is feeding them, throw it out, kill any eggs in what you keep, and seal the rest so there is nothing left to infest.
What attracts pantry pests
Pantry pests get in one of two ways: they arrive as eggs or larvae already inside food, especially in damaged packaging or open bulk bins, or the adults fly or crawl in and find an unsealed box. Warmth and a steady food supply do the rest. Knowing which pest you have tells you where to focus.
- Indianmeal moths leave silk webbing and small caterpillars on the surface of grain, cereal and dried fruit, and the larvae crawl up walls to the ceiling to pupate. Our pantry moth guide covers them in depth.
- Beetles and weevils work through dry staples: sawtoothed grain beetles (tiny, slender, saw-edged), flour beetles (reddish-brown, in milled grain) and weevils (snout beetles inside whole rice and grain). Some, like carpet and larder beetles, also attack wool and other fibres, which our carpet beetles guide deals with.
- Booklice are tiny, pale, soft-bodied insects tied to damp and mould rather than to grain. If that sounds like what you have, the booklice guide and step 9 below are the fix.
Whatever the species, the clean-out below is the same. Only the detail changes.
1. Inspect pantry and toss infested food
Cut off the food supply first. Go through every bag, box and container in the pantry, not just the one where you spotted bugs. Look for webbing, clumping, tiny holes in packaging or larvae crawling around, and check unopened packages too, because larvae chew through cardboard and thin plastic. Do not try to salvage a partially infested bag: the eggs are microscopic and impossible to pick out. Bag anything suspect, seal it, and put it straight in an outside bin. One forgotten infested box restarts the whole problem within weeks.

2. Find the overlooked source
If insects keep returning after a clean-out, something outside the pantry is still feeding them. Widen the search to the garage, basement and laundry room: forgotten pet food, birdseed, grass seed, decorative dried corn or a bag of flour in a spare room are all breeding reservoirs. A sticky trap shows you which room is most active, so you know where to look. Traps will not clear the infestation on their own. If the trail leads into a wall cavity, often a rodent cache of seeds and nuts, that is the point to bring in a professional rather than opening the wall yourself.
3. Vacuum pantry cracks and crevices
With the shelves empty, vacuum before you wash. A cloth skips the cracks, and cracks are exactly where eggs, larvae and loose grain hide. Fit the crevice tool and work every corner, shelf bracket, hinge and the joints where shelves meet walls. These insects survive on almost nothing, so a few missed crumbs can restart the whole thing. Then empty the vacuum straight into a bag, seal it and put it in the outside bin: eggs and larvae survive in a warm canister and hatch there, turning your vacuum into the next breeding site.

4. Clean food storage containers with hot water and soap
Wash everything that was in the pantry: containers, jars, lids, bins and shelves, in hot soapy water, paying attention to lid grooves and shelf joints where egg clusters hide. Rinse and dry completely before anything goes back. Wooden shelves have cracks and joints where eggs lodge, so scrub into those rather than just wiping the surface, and throw out old shelf paper rather than cleaning it. The goal is removing every trace of eggs and residue, not just making things look clean.
5. Freeze infested items for 3+ days
Freeze anything you want to keep but are unsure about. Bag it, press out the air, and leave it at 0°F (-18°C) for at least three to four days; a week is safer. The deep cold kills every life stage – eggs, larvae, pupae and adults – which a quick chill does not. This works for grains, flour, nuts and dried fruit. Keep the container airtight so you do not get freezer burn, and let it come back to room temperature before opening so condensation does not dampen the contents.
6. Heat-treat dry goods in the oven
Heat does the same job from the other direction, and the food is usable the same day. Spread questionable dry goods in a shallow single layer on a baking tray and hold them at 130°F (54°C) for 30 minutes; some extension guides cite 140°F. A deep pile insulates its own middle and leaves live eggs, the usual reason a treated batch reinfests, so keep the layer thin and trust an oven thermometer over the dial. Only heat-tolerant staples take it: whole grains, dried beans, nuts and hard pasta, not anything that scorches or melts.

7. Lock down food storage
Now make the pantry impossible to reinfest. Standard packaging does not stop these insects, and some chew straight through thin plastic and cardboard. Transfer flour, sugar, cereal, pasta, rice and every other dry good into hard-sided containers with tight-sealing lids: mason jars for small amounts, gasket-sealed bins for bulk. Sealed containers also quarantine any eggs you missed, so a single infested bag cannot spread to the rest. This one change prevents more re-infestations than any trap, and it is the step most people skip once the visible bugs are gone.
8. Group remaining items in one area to monitor
Confirm it worked before you relax. Consolidate the clean food into one zone so you are watching a small area instead of the whole cabinet. Check daily for two to three weeks for new webbing, larvae or adults, especially on lids, shelf undersides and the corners where shelves meet walls. No activity after three weeks means you are clear. A pheromone trap works well here as an early warning: if it keeps catching adults, a source remains.
9. Fix leaks and eliminate moisture problems
If your “pests” are booklice, the fix is moisture, not food. These tiny, pale insects feed on the microscopic mould that grows in damp cupboards and on packaging, so discarding food does little; drying the space out is what clears them. Fix leaks under the sink and behind the fridge, wipe away condensation, and improve airflow by airing cupboards or running a dehumidifier in a persistently humid kitchen. Silica gel packs keep sealed containers dry. Chronic condensation at home usually points to a bigger airflow or damp problem worth fixing properly.
Prevention
Keeping pantry pests out comes down to a few habits:
- Store dry goods in airtight containers, not their original bags and boxes. This is the single most effective habit.
- Buy what you will use in two to four months. A bag of flour that sits for a year is the classic reservoir; rotate older stock to the front and discard anything past its date.
- Check groceries before they go in, avoiding dented packages and neglected-looking bulk bins.
- Wipe up spilled grain and crumbs as they happen, and clean shelf corners regularly.
- Freeze flour, grains and spices for a few days when you bring them home if you have had a problem before. It kills anything hitchhiking in before it can start.
When to call a professional
Most pantry infestations clear with a thorough clean-out and sealed storage. Call a professional if insects keep appearing more than three weeks after you have emptied, cleaned and resealed the pantry and you cannot find the source, or if the activity traces to a wall cavity, subfloor or a suspected rodent cache you cannot safely reach. A persistent infestation spreading across several rooms is also worth a pro’s inspection rather than another round of DIY.
Frequently asked questions
How do I get rid of pantry moths for good? There is no one-time spray. Remove and bin every infested item, clean the shelves and cracks, kill the eggs in what you keep by freezing or heating it, and store everything sealed. Pheromone traps catch the males and tell you whether any remain. The pantry moth guide linked above has the moth-specific detail.
What keeps pantry bugs away? Airtight containers, small quantities you use quickly, clean shelves with no spilled grain, and a quick check of food before it goes in the cupboard.
Why do I keep getting bugs in my pantry? Almost always an overlooked source: unsealed food reseeding the cupboard, or a forgotten bag of pet food, birdseed or flour somewhere else in the house.
How long does it take to get rid of pantry beetles? The clean-out works immediately once the source is gone, but keep watching for up to three weeks: adults can keep emerging from eggs laid before you cleaned out, and an Indianmeal moth in particular may appear for about three weeks afterwards. Only call it clear after three weeks with no new activity. Activity past that point means a source is still feeding them.
What smell do pantry bugs hate? Bay leaves, cloves and cedar get passed around as repellents, but no scent clears an infestation. The insects are already inside your food, where a smell on the shelf does nothing, and there is no sound evidence any of these deters them. Removing the infested food and sealing the rest is what works; treat a scent as a minor extra at most, never the fix.


