Codling moth

Codling moth is the cause of what is often referred to as "maggoty apples". The caterpillars of this pest 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
  • 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.

Biological control

  • A pathogenic nematode (Steinernema carpocapsae) is available by mail order from some biological control suppliers. This is a microscopic worm-like creature that enters 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

Pheromone traps

  • Pheromone traps for codling moth are available from garden shops or from mail order suppliers of pest controls. 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. The pheromone is a scent similar to that produced by virgin female codling moths and attracts mates. Male codling moths are lured into the trap and get stuck
  • Pheromone traps alone rarely control codling moths, but on isolated trees may catch enough males to reduce the females' mating success, resulting in fewer fertile eggs being laid. However spray applications can be more accurately timed by using pheromone traps.
  • 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 by the sticky sheet

Chemical 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 deltamethrin (e.g. Bayer Provado Ultra Fruit & Vegetable Bug Killer). Spray in about the third week of June, with a second application about three weeks later. Timing of spray can be more accurately determined by the use of a pheromone trap (see above)
  • In some years, egg hatching may be earlier or later, due to the weather conditions 
  • Manufactures instructions for pesticides on maximum dose, number of applications and harvest interval must be followed for food crops
  • Do not spray trees in flower due to the danger to pollinating insects


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

Biological control suppliers (Adobe Acrobat pdf document)

    A pheromone trap for codling moths. Credit: RHS/Entomology.


    • Adult codling moths emerge in late May-June and lay eggs on or near developing fruits from June to mid-July
    • After hatching, the small white, brown-headed caterpillar bores into a fruit and feeds in the core region
    • This pest overwinters as non-feeding caterpillars in leaf litter or under loose flakes of bark and they pupate in the following spring

    Advertise here

    We love free entry to our local RHS garden

    Lucy, mum, part-time lectureer & RHS member

    Become a member

    Discuss this

    for the site or to share your experiences on this topic and seek advice from our community of gardeners.