Codling moth

Codling moth is the cause of what is often referred to as 'maggoty apples'. The caterpillars of this insect can damage a high proportion of the fruits on apple trees in gardens. It can also affect pear fruits and occasionally it is found in walnut and quince fruits.

An apple with codling moth larvae damage Credit: RHS/Entomology.

Quick facts

Common name: Codling moth
Scientific name: Cydia pomonella
Plants affected: Apples, pears, and infrequently, quinces, walnuts
Main symptoms: Ripening fruits have a small caterpillar feeding in the core
Most active: June-September

What is codling moth?

Codling moth is a small moth whose caterpillars bore into the fruits of apple and pear trees during mid to late summer.



  • The caterpillar’s exit hole is often visible in the side of the ripe fruit or at the 'eye' end (opposite to the stalk)
  • When the fruit is cut open, the tunnel and feeding damage inside the core can be seen, together with the caterpillar’s excrement pellets (frass)
  • Damaged fruits tend to ripen and drop early
  • The small white, brown-headed caterpillar can sometimes be found near the core


It is not worthwhile controlling codling moth on quince or walnut as the level of infestation in these fruits is rarely significant.

Non-pesticide control

Pheromone traps

  • Pheromone traps can be used to trap male moths. They use a scent (sex-pheromone) produced by female moths to lure in males
  • These traps alone rarely control codling moth but monitor moth activity. This can improve control by indicating if a pesticide spray is worthwhile and can help accurately time pesticide use is deemed necessary
  • On isolated trees these traps may catch enough males to reduce the females' mating success, resulting in fewer fertile eggs being laid
  • Pheromone traps for codling moth are available from garden shops or from mail order. These consist of an open-sided box that is hung in the tree in early May. The bottom of the box has a sticky sheet on which the pheromone pellet is placed. Male codling moths are lured into the trap and get stuck
  • By counting the trapped males every week and following the instructions that come with the trap, the best time to spray can be calculated
  • Pheromone traps are designed to prevent birds entering the trap and getting caught on the sticky sheet, although occasionally birds can enter the traps and it may sometimes be necessary to add additional bird netting  

Biological control

  • A mixture of pathogenic nematodes (Fruit and Vegetable Protection) is available by mail order from some biological control suppliers, which may provide some control of codling moth. These are microscopic worm-like creatures that enter the bodies of caterpillars and infects them with a fatal bacterial disease
  • The nematode should be sprayed on the trunk and branches, and also the soil under the branches, in September-October, after the caterpillars have left the fruit
  • This treatment gives no protection in the following year against female codling moths flying in from nearby gardens, and so may not be worthwhile in areas where apples and/or pears are widely grown

Pesticide control

  • Codling moth caterpillars can only be controlled on apple and pear with insecticides before they enter the fruits
  • On trees small enough to be sprayed, the newly-hatched caterpillars can be killed by using the persistent contact pyrethroid insecticides lambda-cyhalothrin (e.g. Westland Resolva Pest Killer), deltamethrin (e.g. Provanto Ultimate Fruit & Vegetable Bug Killer) 
  • The neonicotinoid acetamiprid (e.g. Bug Clear Ultra) is also available
  • Timing of spray can be more accurately determined by the use of a pheromone trap (see above) otherwise a spray in about the third week of June, with a second application about three weeks later may have some effect. In some years, egg hatching may be earlier or later, due to the weather conditions and in years with long summers there may be two generations of the moth 
  • Manufactures instructions for pesticides on maximum dose, number of applications and harvest interval must be followed for food crops
  • Plants in flower should not be sprayed due to the danger to pollinating insects
  • Inclusion of a pesticide product does not indicate a recommendation or endorsement by the RHS. It is a list of products currently available to the home gardener


Pesticides for gardeners (Adobe Acrobat pdf document outlining pesticides available to gardeners)

Biological control suppliers (Adobe Acrobat pdf document)


Adult codling moths emerge in late May-June and lay eggs on or near developing fruits from June to mid-July. The adults are small, up to 22mm wingspan, with blackish-brown and grey speckled wings with a bronzy patch  near the outer edge.

After hatching, the small white, brown-headed caterpillar bores into a fruit and feeds in the core region for about four weeks until fully grown.

The insect leaves the fruit to overwinter as non-feeding caterpillars in leaf litter or under loose flakes of bark and they pupate in the following spring.

Gardeners' calendar

Find out what to do this month with our gardeners' calendar

Advice from the RHS

Did you find the advice you needed?

RHS members can get exclusive individual advice from the RHS Gardening Advice team.

Join the RHS now

Get involved

The Royal Horticultural Society is the UK’s leading gardening charity. We aim to enrich everyone’s life through plants, and make the UK a greener and more beautiful place.