Codling moth: identify, prevent, control
Updated October 2026
Larvae enter fruit from late spring through summer, with two to four generations depending on region.
Codling moth is the classic worm in the apple. Its pinkish white larvae bore into apples, pears, quince and walnuts, tunnel to the core or kernel and push brown frass out of the entry hole. On untreated backyard trees it can damage most of the crop, so timing your control to egg hatch matters more than anything else.
Cydia pomonella

How to identify it
- The first sign is usually a small hole in the side or calyx end of young fruit with a plug of reddish brown crumbly frass sticking out.
- Some holes are only shallow stings where a larva started to enter and died, leaving a small scar.
- Cut a damaged apple or pear open and you find a brown tunnel running to the core, filled with frass, and often a white to pink caterpillar with a dark brown head, up to 3/4 inch long.
- Infested fruit often ripens early and drops in early summer.
- On walnuts, larvae enter the young nuts in spring, causing them to drop, and later bore into the kernel of maturing nuts.
- The adult is a small gray moth about 1/2 to 3/4 inch long with a coppery brown band at the wing tips, which rests flat against the bark by day.
What it is often confused with
Apple maggot
Apple maggot, found mainly in the eastern states and the Pacific Northwest, leaves winding brown trails through the flesh and tiny pinprick marks on the skin, with no frass at an entry hole. Codling moth leaves one obvious hole and a tunnel to the core.
Oriental fruit moth
Oriental fruit moth larvae look similar and also enter apples and pears, but they also attack peach shoots, causing tips to wilt. A comb-like structure under the tail end of the larva separates it, which needs a hand lens.
When and where it is worst
Codling moth is found wherever apples are grown in the United States. It is the main apple pest in the dry West, including California, Washington, Oregon, Utah and Colorado, and a major walnut pest in California. The mature larvae spend the winter in cocoons under loose bark and in debris, and the moths begin flying in spring once evening temperatures reach about 62 °F.
Each female lays 30 to 70 tiny flat eggs on fruit and leaves, and larvae must reach fruit within a day of hatching. California has two to four generations a year, with fewer in cooler northern areas. In parts of Washington, rules can require backyard trees near commercial orchards to be kept free of codling moth.
Plants it attacks
These plants in our library list it as a problem to watch for.
How to prevent it
- Thin apples and pears to one fruit per cluster when they are about 1/2 to 1 inch across, and remove any with entry holes.
- Enclose young fruit in paper bags at the same size, stapled around the stem with a small slit cut in the bottom for drainage, which UC IPM reports gives excellent control without affecting quality.
- Pick up dropped fruit every week from early summer, and remove infested fruit from the tree, so larvae cannot leave to pupate.
- Keep trees pruned to a height you can reach so you can thin, bag and spray properly.
- Hang a pheromone trap in spring to learn when moths are flying, but do not rely on it to reduce damage, and note that mating disruption does not work in small home plantings.
Organic control, step by step
- Use the codling moth granulosis virus, sold for home use, which only affects codling moth larvae; spray it weekly during egg hatch.
- Spray spinosad starting at first egg hatch, with three sprays about 10 days apart for the first generation as UC IPM describes, and keep to the seasonal limit on the label.
- Add 1 percent horticultural oil to the virus or spinosad sprays, which improves their effect.
- Coat fruit with kaolin clay from petal fall to make it less attractive to egg-laying moths, reapplying after rain.
- Do not use Bacillus thuringiensis or plain pyrethrins for codling moth, because UC IPM reports they have not been effective.
Conventional control
- Time all sprays to egg hatch, using local degree-day forecasts from your Extension service or about 200 to 250 degree-days after the first moths are caught, because sprays do not reach larvae once they are inside fruit.
- Carbaryl is labeled for codling moth on home apple and pear trees and protects fruit for two to three weeks, but it is very harmful to bees and natural enemies, cannot be used during bloom, and should not be used on apples in the month before bloom.
- Cover the whole tree, including the tops, and repeat for later generations as the label allows.
- Read the label every time, check that the crop you are treating is listed, and keep to the pre-harvest interval before you pick.
Frequently asked questions
Can I eat an apple with a codling moth hole?
Yes, once you cut out the tunnel and core. The damage spoils storage life, so use affected fruit first and do not keep it with sound apples.
Do cardboard trunk bands work?
Corrugated cardboard bands trap some larvae looking for places to pupate, but UC IPM no longer recommends them as a control in home gardens because they do not reduce damage enough on their own.
When should I start spraying?
Begin at first egg hatch, which in much of California falls in April and in cooler northern areas in late May or June. Your county Extension office or state degree-day model can give a local date.
Does codling moth attack quince?
Yes. Quince, along with apple, pear, crabapple and walnut, is a host, and the same bagging, thinning and spray timing apply.
Related problems
Sources: UC IPM, Codling moth; WSU HortSense, Apple: Codling moth; Utah State University Extension, Codling moth in Utah orchards. Identification and control follow these sources. Always read and follow the product label.
