Worms in Apples: How to Tell Apple Maggots from Codling Moths

Quick answer: Worms in apples almost always mean apple maggots or codling moths. Apple maggot larvae are small, legless, and leave winding brown trails with no frass, while codling moth larvae chew one thick tunnel straight to the core and leave visible frass at the entry hole. Pick up dropped fruit every few days, hang…

Last updated: September 22, 2026

Cut open an apple and find a worm or a tunnel through the flesh, and you're almost certainly dealing with one of two insects: the apple maggot or the codling moth. Both lay their eggs on or near developing fruit, and both can ruin a large share of a home harvest if nothing is done about them.

They look different, damage fruit in different ways, and respond best to slightly different tactics. Once you know which one you're up against, it gets a lot easier to pick the right response, both for the fruit already on the tree and for next year's crop.

This is also a genuinely common problem. Most backyard apple trees across zones 3–6 run into one or both of these pests sooner or later, often within the first few fruiting years. It's not a sign of a sick or neglected tree — it's simply part of growing apples in a region where both insects are already established.

Quick facts on worms in apples

Most common causesApple maggot (Rhagoletis pomonella) and codling moth (Cydia pomonella)
Typical damageTunnels through the flesh, dimpled or sunken spots near entry points
When it shows upFrom midsummer onward, most obvious near harvest
Most vulnerable fruitEarly-ripening, thin-skinned varieties
Best countermeasuresSticky traps, prompt fruit drop cleanup, removing infested apples
Safe to eat?Yes, cut away the damaged part and eat the rest
Comes back every year?Codling moth usually yes; apple maggot pressure varies more by location

Contents

What's Actually Making Holes in Your Apples?

In most home orchards across USDA zones 3–6, the answer is apple maggot or codling moth. Both are the larval stage of small flying insects, not beetles or worms in the biological sense, and both spend part of their life cycle inside the fruit before dropping to the soil to pupate.

A handful of other insects can damage apples, including various weevils and occasional stink bug feeding, but they're far less common in backyard trees. If you've cut open a summer or fall apple and found a tunnel with a larva inside, it's almost always one of these two culprits.

It's also easy to confuse worm damage with a completely unrelated problem: apple scab, which causes olive-green to black spotting on skin and leaves but never tunnels inside the fruit. If you've recently started growing apple trees and haven't run into either issue yet, there's no need to worry in advance — most healthy trees manage fine with a few consistent seasonal habits.

You don't always need to slice the fruit open to get a good guess. A small, dark, slightly sunken hole with visible reddish-brown droppings pushed out usually points to codling moth. Multiple faint, dimpled entry points with no visible droppings, sometimes with a slightly discolored halo around them, point more toward apple maggot. Cutting the apple in half is still the most reliable way to know for sure.

Apple Maggot – What to Look For

The apple maggot isn't strictly an apple specialist. The adult is a small black fly, roughly 1/5 inch (5 mm) long, with distinctive banded markings on its wings, and it also breeds in hawthorn, crabapple, wild rose, and a handful of other related fruits. Hawthorn in particular can act as a wild reservoir that keeps populations going near orchards and gardens even in years when nearby apples aren't heavily hit.

Females lay eggs just under the skin of developing apples through the second half of summer. The larvae that hatch are small, cream-colored, legless, and headless maggots, quite different from a typical caterpillar. They tunnel through the flesh in winding, meandering paths rather than a single straight line, and the tunnels are usually free of visible droppings.

Good to know. Apple maggot damage often shows up first as tiny dimples or pinprick marks on the skin, sometimes days before any internal damage is obvious. Fruit that's been fed on tends to soften and break down faster than healthy apples, so infested fruit dropping early and rotting quickly is a useful early warning sign.

Early-ripening, thin-skinned varieties tend to take the worst damage, likely because they mature during the peak of adult fly activity in mid-to-late summer. Later-season, firmer-skinned apples are usually somewhat less affected, though far from immune.

You rarely spot the adult fly itself out in the yard, since it's small and doesn't linger in the open for long. What you usually notice instead are the downstream effects: apples ripening and dropping earlier than expected, sometimes by a couple of weeks, and fruit that feels unusually soft for its size well before the rest of the tree's crop.

Codling Moth – What to Look For

The codling moth is the classic "apple worm" and, unlike apple maggot, it reliably shows up on untreated trees nearly every year rather than varying sharply with the surrounding landscape.

The adult is a gray moth, about 1/2 to 3/4 inch long, with mottled gray wings and a distinctive coppery patch near the wingtip that's easy to miss unless you're looking for it. It's the larval stage that does the damage: a caterpillar with a visible head, six small legs near the front, and a hardened shield behind the head, growing to about 3/4 inch as it matures. Its body is whitish to pale pink.

The damage looks very different from apple maggot: a single, thick, fairly straight tunnel bores directly toward the core, where the larva feeds on the developing seeds. The entry hole is often dark and slightly sunken, with reddish-brown frass (droppings) visibly pushed out, which is one of the easiest field clues when you're checking fruit without cutting it open.

Mature larvae leave the fruit, often just before or after it drops, and crawl to a sheltered spot — commonly under loose bark or in debris near the trunk — to spin a cocoon and overwinter as a fully grown larva. They pupate the following spring, and adults emerge and mate around the tree's bloom period.

In cooler zones (roughly zones 3–5), codling moth usually manages one full generation per year, occasionally a partial second. In warmer zone 6 conditions and further south, two generations are common and pressure builds noticeably higher over the course of a season. That's worth keeping in mind if you're comparing notes with a gardener in a different climate.

Apple Maggot vs. Codling Moth: How to Tell Them Apart

The fastest way to tell them apart is to cut the apple in half and look at the tunnel pattern. A kitchen knife and two minutes is usually all it takes.

TraitApple MaggotCodling Moth
Tunnel patternMultiple thin, winding trails through the fleshOne thick, fairly straight tunnel to the core
Frass (droppings) at entry holeUsually absent or minimalOften visible, reddish-brown
Larva appearanceLegless, headless, cream-colored maggot, up to 3/8 in (8–10 mm)Caterpillar with head, legs and shield, whitish to pink, up to 3/4 in (about 19 mm)
Adult insectSmall black fly, about 1/5 in, banded wingsGray moth, about 1/2–3/4 in, coppery wingtip
When damage appearsMainly visible at or near harvestVisible in early summer and again at harvest
Host rangeApple, hawthorn, crabapple, wild rose, plum, cherryMostly apple, occasionally pear

Unlike apple maggot, whose tunnels wander and rarely head straight for the core, codling moth larvae are eating their way toward the seeds specifically, which is why the tunnel looks so much more direct. If you find both tunnel types on the same tree in the same season, that's not unusual — it simply means both pests are present, which is common in areas with wild hawthorn or an untreated neighboring orchard nearby.

What to Do Right Now

Fruit that's already infested can't be saved, but you can slow the spread and reduce next year's population with a handful of straightforward steps. No single step solves the problem on its own, but doing several consistently usually shows results within a season or two.

  1. Remove visibly infested apples. Pull fruit with obvious holes, dimpling, or frass off the tree as soon as you spot it, rather than waiting for harvest to sort it out.
  2. Pick up dropped fruit every few days. Walk the tree every two to three days through late summer and gather fallen apples. Larvae that have already left the fruit move into the soil quickly to pupate.
  3. Dispose of heavily infested fruit properly. Bag and trash it, or add it to a hot, actively working compost pile rather than a cold heap or leaving it under the tree, where larvae can simply continue their life cycle.
  4. Hang traps if you haven't already. They won't stop an infestation already underway, but they give you a real read on pressure and help you time next year's response better.
  5. Check nearby fruit trees too. If you have more than one apple, pear, or plum tree, look them over as well — both pests move freely between trees in the same yard.

How to Prevent Next Year's Damage

Most of the real progress against these two pests happens as routine habits across several seasons rather than as a single fix. Fall sanitation is one of the most underrated steps: gather and dispose of all dropped fruit as soon as the season ends instead of letting it rot under the tree, which removes a huge share of the overwintering habitat both pests rely on.

A classic and still effective trick against codling moth is wrapping a band of corrugated cardboard or burlap around the trunk in early-to-mid summer. Larvae crawling down to overwinter often settle into the band instead of loose bark, which makes them easy to collect and destroy — gather and dispose of the bands in late winter, before the moths can emerge in spring.

Loose, flaking bark on the trunk and larger branches is another overwintering site codling moth larvae favor. Scraping away clearly loose bark during the dormant season, without damaging the healthy bark underneath, removes some of that shelter.

Common mistake. Leaving a few dropped apples "until the weekend" feels harmless, but larvae often leave the fruit within a day of it falling. The longer windfalls sit, the more larvae make it into the soil to overwinter undisturbed.

If you only have a tree or two, physical barriers are worth considering. Fine mesh bags or exclusion bags slipped over individual fruit clusters shortly after petal fall keep egg-laying adults away from the skin entirely. It's labor-intensive and rarely practical for a large, mature tree, but can be worthwhile for a young tree you're especially invested in protecting during its first productive years.

Early-ripening, thin-skinned varieties are consistently more vulnerable to both pests than later, firmer-skinned ones. That's rarely a reason to remove an established tree, but it's worth factoring in if you're planning a new planting.

Let Birds and Other Natural Predators Help

You're not the only one interested in fewer larvae around. Chickadees and other insect-eating birds actively work bark and branches through winter, picking off exactly the kind of overwintering larvae codling moth leaves behind. A yard with nest boxes, brush piles, or other features that keep small birds around through the colder months gets a bit of natural downward pressure on populations, even though it's rarely enough on its own.

The same logic applies to ground beetles and other predators that feed on pupae in the soil beneath the tree. Broad-spectrum insecticide use doesn't just knock back apple maggot and codling moth — it also removes the natural predators that would otherwise help keep numbers down over time. Targeted tactics like traps, fruit drop cleanup, and trunk bands disturb that balance far less.

Do Traps Actually Work?

Yes, with the right expectations. Traps generally fall into two categories: pheromone traps, which use a synthetic scent to lure male moths, and sticky red sphere traps, which visually mimic a ripe apple to lure apple maggot flies looking for a place to lay eggs.

Traps are best used for monitoring and as one part of a broader plan, not as a standalone fix. Counting how many insects get caught per week tells you how much pressure your yard is actually under and roughly when egg-laying is peaking, which makes it much easier to time fruit drop cleanup and other steps.

Hang red sphere traps for apple maggot by early-to-mid June, at roughly eye level and in a sunny, visible part of the canopy — one per dwarf tree, two to four for a full-size tree. Hang codling moth pheromone traps around bloom time, in a shaded part of the canopy where the lure lasts longer.

Good to know. Homemade traps — red plastic balls coated in a sticky substance, or jars of fermented molasses, water, and yeast — can catch some apple maggot flies, but they're generally less reliable than commercial lures and traps. They're a reasonable low-cost starting point, not a full replacement for a proper monitoring setup.

Timing Calendar: What to Do When

Exact dates shift with your zone and the specific year's spring weather — a cold, late spring pushes the whole sequence back, while an early warm spring can move bloom and egg-laying forward by a couple of weeks. Treat this as a general guide rather than a fixed schedule, and adjust based on what you actually see in your own yard.

PeriodWhat's HappeningYour Action
Early-mid spring (zones 3–5)Overwintered codling moth larvae pupate; bloom beginsPrepare trunk bands and traps ahead of bloom
Bloom to early summerCodling moths emerge, mate, and begin laying eggsHang codling moth traps, apply trunk bands
Early-mid JuneApple maggot flies begin emerging in many areasHang red sphere traps for apple maggot
MidsummerLarvae of both pests active inside developing fruitRemove visibly infested apples as you spot them
Late summerEarly varieties ripen and drop; larvae exit fruitCollect windfalls at least twice a week
Fall through harvestLater varieties ripen; final larvae seek winter shelterClean up all remaining dropped fruit after harvest
WinterLarvae overwinter in soil, bark, and trunk bandsCollect and destroy trunk bands before spring emergence

Can It Spread from a Neighbor's Tree?

Yes, realistically it can. Both apple maggot flies and codling moths travel on their own between trees in a neighborhood or community garden, and they don't recognize property lines. If a nearby yard has an untreated, heavily infested tree, or wild hawthorn growing close by, your own tree's risk goes up too, especially if the trees are reasonably close together.

In a neighborhood with several backyard apple trees, it's rarely worth trying to solve this entirely on your own. Mention what you're seeing to neighbors with fruit trees, particularly if you're finding heavy damage. Shared fruit drop cleanup and shared awareness across a block tend to produce noticeably better results than one household doing everything right while the tree next door is left alone.

If you live somewhere with a community garden plot or a shared orchard, it's worth raising the topic at a meeting rather than handling it quietly on your own row. Even something as simple as agreeing on a weekly windfall cleanup schedule across a few neighboring plots can measurably reduce pressure for everyone involved.

Is It Safe to Eat an Apple with a Worm in It?

Yes. Finding a larva or a tunnel doesn't make the rest of the apple unsafe. Cut away the damaged section, including the tunnel and any discoloration around it, and eat or cook the rest as usual.

Plenty of people still choose to toss the whole apple out of simple distaste, which is entirely reasonable. From a food-safety standpoint, though, there's nothing to worry about. Fruit that's already started rotting around the damage is better composted than eaten, mostly for quality and flavor reasons rather than any real risk.

Apples with a single, contained tunnel work well in sauce, cider, or baking, where you're cutting or processing the fruit anyway and can easily sort out the part you don't want. If you're unsure how far the damage extends, cutting away an inch or two (2–3 cm) around the visible tunnel is usually more than enough to remove anything you'd rather not eat.

Common Mistakes

  • Letting windfalls sit. The longer dropped apples stay on the ground, the more larvae make it into the soil to overwinter successfully.
  • Composting infested fruit in a cold pile. A pile that never heats up properly rarely kills the larvae inside, letting them continue their life cycle from the compost itself.
  • Confusing worm damage with apple canker or apple scab. Canker and scab show up on the bark, skin, and leaves, not as tunnels through the flesh, and call for entirely different responses.
  • Hanging traps too late in the season. A trap that goes up in August misses most of the egg-laying window and provides little more than data for next year.
  • Assuming one quiet year means the problem is solved. Apple maggot pressure in particular can shift quickly based on nearby wild hosts like hawthorn, so a calm season doesn't guarantee the next one will be too.
  • Spraying broadly "just in case." Non-selective insecticides hit pollinators and natural predators just as hard as the target pest, which can leave you worse off over several seasons.

Frequently Asked Questions

Is it safe to eat an apple with a worm or tunnel in it?
Yes. Cut away the damaged part and eat the rest as usual. Heavily damaged or rotting fruit is better composted, mainly for taste and texture rather than any safety concern.

How do I tell apple maggot from codling moth?
Cut the apple in half and look at the tunnel. Several thin, winding trails with little or no visible frass point to apple maggot, while a single thick, fairly straight tunnel to the core with visible reddish-brown droppings points to codling moth.

When should I put up traps?
Hang codling moth traps around bloom time, typically late spring depending on your zone. Hang red sphere traps for apple maggot a bit later, by early-to-mid June, since that pest tends to become active as the codling moth's first generation is already underway.

Does picking up dropped fruit actually help?
Yes, it's one of the most effective steps available to home growers. Larvae often leave the fruit within a day of it falling, so frequent cleanup through late summer noticeably reduces how many make it into the soil to overwinter.

Is there a home spray that works against codling moth?
There's no common household mixture with reliably proven effectiveness against codling moth larvae, which spend most of their time protected inside the fruit. Fruit drop cleanup, trunk bands, and traps consistently outperform improvised home sprays in a typical backyard setting.

Why does apple maggot pressure vary so much between years and yards?
Apple maggot relies partly on wild host plants like hawthorn and crabapple as reservoirs. A yard near wild hawthorn, or in a neighborhood with several untreated trees, tends to see more consistent pressure than an isolated tree farther from those hosts.

Do these pests attack pears and plums too?
Codling moth mainly targets apple, with occasional damage to pear. Apple maggot is more flexible and can infest plum, cherry, apricot, and hawthorn in addition to apple, so it's worth checking other fruit trees in the same yard as well.

Will the problem come back if I don't do anything at all?
Codling moth tends to show up on untreated trees nearly every year, so an unmanaged tree usually sees repeat damage season after season. Apple maggot pressure depends more on the surrounding landscape and can vary on its own, but skipping cleanup and traps altogether generally leads to more damage over time, not less, for either pest.

If you're dealing with more than one fruit tree, it's also worth reviewing how you planted your fruit trees and pollination groups for your apple varieties. Subscribe to our newsletter for more practical guides throughout the growing season.