Pest

Worms inside apples at harvest: codling moth

Last reviewed September 2026 · written from Cooperative Extension and university horticulture references — see how we source data

Illustration of an apple cut in half showing a brown tunnel from an entry hole with frass through the flesh to the core, where a pinkish-white codling moth caterpillar is feeding, next to a whole apple with an entry hole and a small grey moth.

What you’re seeing

A small entry hole, often near the blossom end or where two fruit touch, with a trail of brown, crumbly frass leading to a tunnel through the flesh to the core, where a pinkish-white caterpillar is often found.

Could it be something else?

Apple maggotBrown, winding trails through the flesh and dimpled, lumpy fruit, with tiny pinprick holes on the skin - but no single tunnel to the core.
Plum curculioCrescent-shaped scars on the skin of young fruit, which often drop early.
Oriental fruit mothSimilar tunnels in fruit, plus wilting shoot tips on peaches and quince early in the season.

Likely causes

Ranked most common first.

  1. Codling moth larvae. The caterpillar of a small gray moth hatches from an egg laid on or near developing fruit and tunnels straight to the core to feed, usually going undetected from the outside until the fruit is cut open or drops early.
  2. Multiple generations per season. In many regions codling moth produces two to three generations a season, so a single early-summer control effort often isn't enough to protect a fall harvest.
  3. Unmanaged nearby abandoned trees. A neglected apple or pear tree nearby (yours or a neighbor's) can act as a continuous source of moths reinfesting a well-managed tree.

How to fix it

  1. Bag individual young fruit in small paper or nylon-footie bags a few weeks after petal fall - labor-intensive but very effective for a home garden with a manageable number of fruit.
  2. Hang pheromone traps to monitor and reduce male moth numbers, and to time any spray to actual local moth activity rather than a generic calendar date.
  3. Pick up and destroy fallen "June drop" fruit promptly, since a good share of it has already been stung by codling moth and removing it breaks the cycle.
  4. Apply a horticultural-oil or Bt-based spray timed to egg hatch (roughly 7-10 days after a pheromone trap shows peak moth activity) if damage has been heavy in past years.
  5. Wrap corrugated cardboard bands around the trunk in midsummer to trap larvae looking for a place to pupate, then remove and destroy the bands every couple of weeks.

Common mistakes

  • Spraying at the wrong time. Sprays only work around egg hatch, before larvae burrow in - pheromone traps help time them.
  • Leaving fallen fruit on the ground, where larvae leave it to pupate and emerge as the next generation.
  • Bagging fruit too late, after larvae have already entered.
  • Relaxing after spring. A second generation often causes more damage in mid to late summer.

When and where it shows up

Adult moths fly around bloom time and lay eggs on leaves and small fruit; larvae enter the fruit roughly one to three weeks after petal fall. There are one to three generations a year depending on climate, so a second wave of damage often arrives in midsummer. Codling moth attacks apples, pears, quince and English walnuts.

Preventing it next time

Clean up fallen fruit promptly all season, use pheromone traps to track activity, and bag individual fruit for the most reliable home-garden control without spraying.

Questions gardeners ask

Are apples with codling moth damage safe to eat?

Yes. Cut away the tunnel and core; the rest of the apple is fine. Damaged fruit ripens early and does not store, so use it first.

Do pheromone traps control codling moth?

In a home garden they are mainly for monitoring - telling you when moths are flying so you can time other controls. On a single small tree, mating-disruption and traps can reduce numbers somewhat.

When should I bag apples?

After thinning, when fruit is about the size of a nickel, roughly two to four weeks after petal fall - before the larvae arrive.

Why are there more wormy apples in late summer?

The second generation. Moths from spring larvae lay eggs again in midsummer, often on fruit that escaped the first wave.

Related crops

Apple →Pear →