Worms in apples are almost always the larvae of one of three insects: the codling moth, whose pinkish-white caterpillar tunnels to the core and leaves brown, crumbly frass at its entry hole; the apple maggot, a small white fly larva that leaves winding brown trails through the flesh; or the plum curculio, a weevil whose grubs cause crescent-shaped scars and misshapen fruit. They are not harmful to eat if you cut them out, but they spoil fruit. You can prevent most wormy apples with fruit thinning, bagging young apples, sanitation, traps and, where needed, properly timed sprays labeled for each pest.
Worms in apples: which pest is it?
| Pest | Larva | Damage inside the apple | Outside signs | When it attacks |
|---|---|---|---|---|
| Codling moth (Cydia pomonella) | Pinkish-white caterpillar with brown head and legs, up to ¾ inch | Tunnel straight to the core; seeds eaten; brown frass | Hole with brown, sawdust-like frass, often at the blossom end | From late spring; one to two or more generations |
| Apple maggot (Rhagoletis pomonella) | Small, legless, cream-colored maggot, about ⅜ inch | Brown winding tunnels through the flesh; fruit turns pulpy | Tiny pinprick dimples; lumpy fruit | Mid to late summer; one generation |
| Plum curculio | Legless, C-shaped, cream grub with brown head | Grubs usually die in apples; fruit deformed | Crescent-shaped scars; knobby fruit; June drop | Just after bloom for about 4 to 6 weeks |
| Oriental fruit moth | Pinkish caterpillar, similar to codling moth | Tunnels near stem and core | Entry near the stem; shoot tips wilt in spring | Spring to late summer |
What is the codling moth?
The codling moth is the classic “worm in the apple.” The Washington State University Hortsense codling moth fact sheet describes adults as gray moths with dark brown bands near the wing tips, about ½ to ¾ inch across. Females lay eggs on leaves and fruit; the hatching larvae bore into the fruit, usually through the blossom end, and feed on the core and seeds. Mature larvae, about ¾ inch long and cream to pinkish-white with brown heads, leave the fruit and spin cocoons under loose bark or in debris, where they overwinter. Adults typically emerge in May to June, and there can be two generations a year, so damage continues through summer.
Cut open a codling moth apple and you will see a tunnel to the center, a brown, rotted core with eaten seeds and frass pushed out of an entry or exit hole. Codling moth also attacks pears, quince and walnuts.

What is the apple maggot?
The apple maggot is the larva of a small fly with banded wings, related to fruit flies. The Seattle Public Utilities apple maggot IPM fact sheet explains that females lay eggs under the skin, leaving tiny punctures that dimple the surface, and the maggots tunnel through the flesh, unlike codling moth, which feeds in the core. Infested fruit becomes lumpy, brown-streaked and eventually pulpy. Adults emerge from early June through September, there is one generation a year, and early varieties are especially susceptible. Hawthorns and neglected apple and crabapple trees are common sources.
Is it safe to eat an apple with a worm in it?
Yes. Codling moth larvae and apple maggots are not toxic or harmful to people. Cut away the damaged part and eat or cook the rest. Heavily damaged fruit is best used promptly for sauce or cider, after removing tunnels and rot, because insect injury lets in decay. For sanitation, destroy badly infested fruit rather than leaving it under the tree.
How do you prevent worms in apples without spraying?
Thin and bag the fruit
Bagging is the most effective non-chemical method for a few trees. Thin each cluster to a single apple when the fruit is about dime- to nickel-sized, then cover each apple with a bag. WSU recommends bagging uninfested fruit about 4 to 6 weeks after petal fall using paper, wax paper or double-layer Japanese fruit bags and leaving them on through the season. Many home growers use nylon “footie” socks, which also block apple maggot and allow the fruit to color. The Seattle fact sheet describes cutting a small slit in the bottom of a No. 2 paper bag, slipping it over the fruit and stapling it closed.
Sanitation
Pick up fallen apples every day or two during summer and destroy them. WSU advises sealing infested fruit in a bag in hot sun for a week or crushing it rather than composting it, and Seattle Public Utilities recommends removing fallen fruit daily for apple maggot. Clear brush and debris from under trees, and remove neglected apple, crabapple and hawthorn trees nearby if practical.
Trunk bands and bark scraping
Mature codling moth larvae look for sheltered places to spin cocoons. WSU suggests removing loose bark and wrapping trunks with corrugated cardboard or burlap bands, then removing and destroying the bands, with the larvae inside, every couple of weeks during summer and in fall.
Traps
- Apple maggot: Red sphere traps coated with sticky material, or yellow sticky panels, attract adult flies. Seattle Public Utilities suggests hanging them on the south side of the canopy and renewing the sticky surface every two weeks from June to early October. On small trees, several traps per tree provide some control.
- Codling moth: Pheromone traps attract male moths. They are mainly used to time sprays and monitor numbers, not as a control on their own, although mass trapping and mating disruption dispensers can help in isolated orchards.
Kaolin clay
Kaolin clay particle film sprayed on fruit and leaves deters egg laying by several fruit pests, including plum curculio, and can reduce damage from apple maggot and codling moth when applied thoroughly and renewed after rain. Follow the product label.
Keep trees small
WSU notes that dwarfing rootstocks and pruning trees under about 10 feet make bagging, inspection and any spraying far easier. See dwarf apple trees.
When should you spray for codling moth and apple maggot?
If you choose to spray, timing matters more than the product. WSU advises starting codling moth applications about 10 days after full petal fall, or 17 to 21 days after full bloom, and reapplying per the label through late spring and summer. Apple maggot sprays target adult flies before they lay eggs and are best timed by trap catches, beginning in early to midsummer. Never spray insecticides during bloom, when bees are active. Homeowner products registered for these pests vary by state; WSU lists examples such as spinosad and some pyrethroids for Washington, and notes that some products are toxic to bees and that homeowners should not spray trees over 10 feet tall.
Pesticide label note: The label is the law. Use only products registered for apples and for the specific pest in your state, and follow the label for rates, timing, protective equipment and the pre-harvest interval. Do not spray open blossoms or when bees are foraging. Read more on the EPA pesticide labels page, and check your state extension fruit spray guide for current recommendations.
Is there an apple maggot quarantine?
In some regions, yes. Parts of the western US, including areas of Washington, Oregon and California, have quarantines to keep apple maggot out of commercial orchard districts. Seattle Public Utilities notes that highway signs in western Washington remind drivers not to move homegrown fruit out of quarantine areas. If you live in a quarantine area, do not transport homegrown apples, pears or other host fruit to non-quarantine areas, and check your state agriculture department’s rules.

Which apples are least likely to get worms?
No apple variety is resistant to codling moth or apple maggot. Early-ripening varieties tend to suffer more from apple maggot, and thin-skinned, sweet apples can be more attractive. Late-blooming varieties may partly escape the first wave of codling moth. Protection, not variety choice, is the key, although choosing disease-resistant varieties such as the Liberty apple reduces the number of other sprays you need, which helps natural enemies of pests survive.
Do pears and other fruits get the same worms?
Yes. Codling moth attacks pears, quince and walnuts as well as apples. Apple maggot can attack pears, plums, cherries and apricots, though apples are its main host. Plum curculio attacks apples, pears and all stone fruit. The same bagging and sanitation methods work for pears; see our guides to when to pick pears and types of pears.
Season-long plan to prevent wormy apples
| Time | Action |
|---|---|
| Late winter | Scrape loose bark; clean up debris and old fruit; prune to keep trees small |
| Bloom | No sprays; hang codling moth pheromone traps to monitor |
| Petal fall to 6 weeks after | Protect against plum curculio; begin codling moth protection about 10 days after petal fall if needed |
| 4 to 6 weeks after petal fall | Thin fruit to one per cluster; bag fruit |
| Early June | Hang red sphere or yellow sticky traps for apple maggot; add cardboard trunk bands |
| Summer | Pick up dropped fruit every day or two; renew traps; remove trunk bands every few weeks |
| Harvest | Sort fruit; use damaged apples promptly |
| Fall | Remove all fallen and mummified fruit; destroy trunk bands |
What else causes holes and tunnels in apples?
- Stink bugs: Feeding leaves corky, dimpled spots under the skin, sometimes mistaken for apple maggot, but without tunnels or larvae.
- Leafrollers and fruitworms: Caterpillars chew shallow gouges in the skin of young fruit, leaving russeted scars at harvest.
- Birds and wasps: Peck and hollow out ripe fruit, especially late in the season.
- Bitter pit and cork spot: Brown, corky spots in the flesh caused by calcium imbalance, not insects.
If you are not sure what is damaging your fruit, the pest identifier and the plant problem identifier can help narrow it down.
Do natural enemies help control apple worms?
Yes, partly. Parasitic wasps attack codling moth eggs and larvae, birds such as woodpeckers and chickadees eat overwintering larvae under bark, and ground beetles and spiders eat larvae that drop to the soil. Natural enemies rarely give complete control on their own, but they reduce pest numbers, especially when you avoid broad-spectrum insecticides that kill them. WSU recommends conserving natural enemies by avoiding broad-spectrum sprays where possible. Providing bird boxes and flowering plants for beneficial insects near the orchard supports them.
Can chickens help with apple worms?
Chickens and ducks foraging under apple trees eat dropped fruit, larvae leaving the fruit and some pupae in the soil, which can reduce codling moth, apple maggot and plum curculio over time. They work best combined with regular collection of dropped fruit and other controls. Keep birds away during and after any pesticide applications and observe label re-entry intervals.
For other trees and berries to grow alongside this one, see the home fruit tree guide.
Codling moth timing: traps, spray window and cleanup
University of Minnesota Extension’s codling moths in home orchards explains there are two generations a year in Minnesota. First-generation adults emerge just before bloom, and females lay up to 100 eggs on small developing apples. Larvae feed at the fruit surface, then tunnel toward the core and eat the seeds, leaving crumbly golden-brown frass at the exit hole. A second generation can start in late July or early August but is not important in home orchards.
- Traps: hang delta or wing traps with a pheromone lure at about eye level on the outside of the canopy in early May, check weekly from mid-May, and replace lures every one to two months. If you catch no codling moths, you may not need sprays.
- Spray timing: after most or all petals have fallen, because earlier sprays are ineffective and kill pollinating bees, with a second spray 7 to 10 days later. Check the label and pre-harvest interval.
- Cleanup: remove fallen apples through the season and after harvest, do not store good apples where discarded fruit sits, and inspect crates and storage buildings for cocoons. Adults can fly up to a mile, so cleanliness alone may not suffice under heavy pressure.
See our fruit trees hub for related guides.
Safety and legal note: Insecticides are toxic to bees: spray only after petal fall and never on open blooms, and follow pre-harvest intervals. Dispose of infested fruit in sealed trash rather than compost. Rules vary by country and region.
Free printable: the Year-Round Garden & Preserving Planner
Planting dates for 24 crops, monthly tasks, blanching times, canning safety numbers and a winter storage chart in one 8-page PDF. Enter your email to download it instantly and get our seasonal garden newsletter.
No spam. Unsubscribe any time. We never sell your email.
Frequently asked questions
What are the worms in my apples?
Usually codling moth caterpillars, which tunnel to the core, or apple maggots, which leave brown trails through the flesh.
Can you eat apples with worm holes?
Yes. Cut away the damaged parts; the rest of the apple is safe to eat or cook.
When do you bag apples to prevent worms?
About 4 to 6 weeks after petal fall, when apples are dime- to nickel-sized, after thinning to one per cluster.
Do apple maggot traps work?
Red sphere sticky traps catch adult flies and help monitor and reduce numbers on small trees, especially combined with sanitation.
Why are my apples dropping with worms in them?
Codling moth and plum curculio damage often makes young apples drop early. Collect and destroy the drops.
How do I get rid of codling moth naturally?
Thin and bag fruit, use cardboard trunk bands, scrape loose bark and remove dropped fruit regularly.
Reviewed October 2026. Sources: Washington State University Hortsense, Apple: Codling Moth; Seattle Public Utilities, Apple Maggot IPM Fact Sheet; US EPA, Pesticide Labels.
Additional sources: University of Minnesota Extension, Codling moths in home orchards



