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.

Save to My scrapbook
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
Plums damsons and gages can be affected by a related species of moth, more information 


It is not worthwhile controlling codling moth on quince or walnut as the level of infestation in these fruits is rarely significant. Use pheromone traps placed in May (details below), so if necessary action can be taken before a damaging infestation has developed. When choosing control options you can minimise harm to non-target animals by starting with the methods in the non-pesticide control section. If this is not sufficient to reduce the damage to acceptable levels then you may choose to use pesticides. Within this group the shorter persistence pesticides (that are usually certified for organic growing) are likely to be less damaging to non-target wildlife than those with longer persistence and/or systemic action.
Non-pesticide control

  • Where possible tolerate the loss of some fruit to codling moth, often only a small proportion of fruits are affected
  • Encourage predators and other natural enemies in the garden such as birds, hedgehogs and ground beetles
Pheromone traps
  • Pheromone traps can be used to trap male moths. They use a synthetic version of volatile chemical (sex-pheromone) produced by female moths to lure in males
  • Pheromone traps for codling moth are available from garden shops or via 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
  • 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 if deemed necessary
  • On isolated trees these traps may catch enough males to reduce the females' mating success, resulting in fewer fertile eggs being laid
  • 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 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
Pesticide treatment is only possible and worthwhile on small trees that can be sprayed thoroughly
  • Codling moth caterpillars can only be controlled on apple and pear with insecticides before they enter the fruits
  • Organic contact insecticides containing natural pyrethrins (e.g. Bug Clear Gun for Fruit & Veg, Neudorff Bug Free Bug and Larvae Killer). Several applications of these short persistence products may be necessary to give good control
  • More persistent contact insecticides include the synthetic pyrethroids lambda-cyhalothrin (e.g. Westland Resolva Bug Killer), deltamethrin (e.g. Provanto Ultimate Fruit & Vegetable Bug Killer, Provanto Sprayday Greenfly Killer) and cypermethrin (e.g. Py Bug Killer)
  • 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 

Follow label instructions when using pesticides. On edible plants make sure the food plant is listed on the label and follow instructions on maximum number applications, spray interval and harvest interval.
Plants in flower should not be sprayed due to the danger to bees and other pollinating insects.
Inclusion of a pesticide product does not indicate a recommendation or endorsement by RHS Gardening Advice. It is a list of products currently available to the home gardener.


Pesticides for gardeners (pdf document)
Biological control suppliers (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.

Join the RHS today and get 12 months for the price of 9

Join now

Gardeners' calendar

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

Advice from the RHS

You may also like

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.