If you want to keep moths out of the pantry and closet, the trick is to stop their larvae from finding food and a quiet place to hide, because the larvae are what do the damage, not the fluttering adults. In the pantry, move dry goods into airtight glass or hard plastic, since cardboard boxes and bag clips do not stop a chewing larva, rotate your stock so nothing sits for a year, and freeze new bulk grains or flour for a few days to kill any eggs that rode in. In the closet, only ever store clean clothes, because larvae feed on the food and sweat stains left in the fibers, seal seasonal wool in bins or garment bags, and hang a pheromone trap as an early-warning monitor. You are not really killing moths here. You are making your home a place where they cannot breed.
Prevention means denying moth larvae food and hiding spots: store pantry dry goods airtight, freeze new bulk grains, store only clean wool sealed in bins, and use a pheromone trap to monitor, never to cure.
- Pantry, do first (free): Move flour, grains, and pet food into airtight glass or hard plastic, rotate stock, and freeze new bulk bags for a few days.
- Closet, do first (free): Clean clothes before storage, vacuum closet corners, and seal off-season wool in bins or garment bags.
- Skip as a cure: Cedar, herbal sachets, and pheromone traps alone; they repel or count adults but do not kill larvae already feeding.

Two moths, one weakness
People lump them together, but the pantry moth and the clothes moth are different insects with different diets, and prevention only works once you know which one you are denying a meal. The pantry kind is usually the Indianmeal moth, and its larvae live inside dry food, chewing through grains, flour, cereal, nuts, dried fruit, birdseed, and pet kibble. The closet kind is the clothes moth, and its larvae eat keratin, the protein in wool, silk, fur, feathers, and down. They do not touch cotton, linen, or polyester unless those fabrics are stained with food, sweat, or body oils.
That shared weakness is the whole strategy. Both moths breed where their larvae can eat undisturbed, so if you remove the food and the still, dark hiding spot, the adults have nowhere to lay eggs that survive. According to UC IPM’s notes on how clothes moth larvae feed on wool and keratin, it is the larval stage that grazes on your sweaters, while the adult moth you swat has no functional mouthparts and never eats a thing. The adult exists only to mate and lay eggs, which is exactly why chasing the ones flying around your kitchen light feels endless and changes nothing.
Seal and freeze the pantry
Start in the kitchen, because pantry prevention costs almost nothing and stops the most common infestation. The single highest-value move is to transfer dry goods into airtight glass or hard plastic with a real gasket or screw lid. A cardboard box, a folded bag, or a chip clip will not keep larvae out, and worse, moths often arrive already inside a sealed-looking package from the store, then chew out into the rest of the shelf. Clear containers also let you spot webbing or clumping before it spreads.
Next, kill the hitchhikers. Eggs ride home in flour, grains, and seed, so airtight storage and freezing for insects in stored grain is the standard prevention pairing: put new bulk grains, flour, cornmeal, and pet food in the freezer for three to four days, which kills any eggs or larvae before they can develop. Then rotate. Use the oldest package first and do not let anything sit for a year, since forgotten bags at the back of the shelf are where these moths build up unnoticed. The EPA’s sanitation-first approach to pest control makes the same point across every pest: take away the food and the harborage before you reach for anything else.
One more habit pays off. Every few months, pull everything out and wipe the shelves, paying attention to the seams and corners where the shelf meets the wall, because larvae crawl out of infested food to pupate in exactly those cracks. If you ever do find an active infestation, prevention is not enough on its own. You have to find and throw out the infested package and vacuum the shelf seams, which our guide to getting rid of pantry moths walks through step by step.

Clean, then store the closet
Closet prevention runs on one rule that surprises people: only ever put away clean clothes. Clothes moth larvae are drawn to wool that carries sweat, food spots, and body oils far more than to spotless fibers, so an unwashed sweater folded away for the summer is an open invitation. Iowa State’s guidance on cleaning and storage to stop clothes moths is blunt about it: laundering or dry-cleaning before storage removes both the eggs already laid and the stains that feed the next generation.
Once items are clean, seal them. Off-season wool, cashmere, and down belong in airtight bins or zippered garment bags, not draped over a rod where moths can reach them all summer. Sealing does double duty, locking out new egg-laying and trapping anything you missed. It helps to know which moth you have, too, because the difference between webbing and casemaking clothes moths changes where you find the damage, with one spinning silken patches on the fabric surface and the other dragging a little case along as it feeds.
Do not assume every fabric hole is a moth, either. Carpet beetles, the main clothes-moth look-alike that also eats fabric, leave similar damage but call for the same cleaning-and-sealing prevention, so the habits here cover both. If a closet is already active, the fix mirrors the pantry: hot-wash or freeze the infested wool and vacuum the closet floor and corners, which our guide to getting rid of clothes moths covers in full.

What each tactic actually does
Prevention tools get marketed as if any of them solves the problem, but each one has a narrow job. Match the tool to the room and the moth, and skip the ones sold as miracle cures.
| Tactic | What it actually does | What it does not do |
|---|---|---|
| Airtight glass or plastic | Locks larvae out of dry food and contains hitchhikers | Will not save food already infested |
| Freezing new grains | Kills eggs and larvae riding in from the store | Does nothing for fabric pests |
| Clean and seal wool | Removes the stains larvae feed on, blocks egg-laying | Useless if clothes go in dirty |
| Pheromone trap | Catches male adults so you spot a problem early | Never clears an active infestation alone |
| Cedar or herbal sachet | Mildly repels some adults for a while | Fades in months, kills no feeding larvae |
A word on the two things people lean on too hard. A pheromone trap is a monitor, not a cure, because it lures only male adults to disrupt mating and to warn you that breeding is happening somewhere nearby. It does not touch the larvae doing the damage, and it cannot end an infestation by itself. Worth knowing: pantry-moth and clothes-moth traps use different pheromones and are not interchangeable, so buy the right one for the room. As for cedar blocks and herbal sachets, they repel some adults and lose their punch within a few months, and they do not kill larvae already feeding in the fibers. If you want the trap that fits your situation, we compare them in our tested moth traps for pantry and clothes moths.
Common questions
Do moths eat clothes, or is it the larvae?
It is the larvae. Adult clothes moths cannot eat at all, since they have no working mouthparts, so every hole in your wool was chewed by a larva. The fluttering adult is only there to mate and lay eggs, which is why killing the ones you see does nothing for the damage. Prevention has to target where larvae feed and hide.
Will a pheromone trap get rid of my moths?
No. A pheromone trap catches male adults to disrupt mating and to tell you a problem exists, but it leaves the larvae untouched and cannot clear an infestation on its own. Use it as an early-warning monitor alongside sealing and cleaning. If a trap fills up fast, that is your cue to hunt for the infested food package or wool item.
Does cedar actually stop moths?
Only weakly, and not for long. Cedar and herbal sachets repel some adult moths through scent, but the effect fades within a few months as the oils dry out, and neither one kills larvae already feeding. Treat cedar as a minor backup to airtight storage and clean, sealed wool, never as the main defense.
Why do I still get pantry moths in sealed-looking food?
Because the eggs often arrive inside the package from the store, before you ever open it. That is why freezing new bulk grains and flour for a few days matters, since it kills anything riding in. Transferring food into truly airtight containers then stops larvae from spreading to the rest of the shelf if one package was already carrying them.
Are the pantry moth and the closet moth the same insect?
No, and treating them the same wastes effort. The pantry moth, usually the Indianmeal moth, has larvae that eat dry food, while the clothes moth has larvae that eat keratin in wool and silk. Their traps even use different pheromones. Knowing which one you are facing tells you whether to focus on the kitchen shelf or the closet.
Final verdict
Preventing both kinds of moth is the same idea applied in two rooms: take away what the larvae eat and the dark, undisturbed spot where they hide. In the pantry, move dry goods into airtight glass or hard plastic, freeze new bulk grains and flour for a few days, rotate your stock, and wipe the shelf seams. In the closet, store only clean clothes, seal off-season wool in bins or garment bags, and vacuum the corners. Keep a pheromone trap as a monitor so you catch trouble early, but never lean on it, on cedar, or on a sachet to do the actual work, because none of them kills a feeding larva. Do the boring sealing and cleaning, and the adults simply have nowhere to breed.
Next steps:
– If you already see webbing or clumping in food, find and toss the package with our guide to getting rid of pantry moths.
– For active fabric damage, hot-wash or freeze the wool using our guide to getting rid of clothes moths.
– Pick the right monitor for your room in our tested moth traps for pantry and clothes moths.
Reviewed by Daniel Brooks, licensed pest control professional, focused on safe and effective control.



