How to Manage Pests

Pests in Gardens and Landscapes


Revised 12/10

In this Guideline:

PDF to Print

Weeping, oozing, wet, discolored walnut trunk with brownish fras exudate from carpenterworm larvae.

Weeping, oozing, wet, discolored walnut trunk with brownish frass exudate from carpenterworm larvae.

Mature carpenterworm, Prionoxystus robiniae, larva in its tree gallery.

Mature carpenterworm, Prionoxystus robiniae, larva in its tree gallery.

Damage to trunk caused by carpenterworm feeding.

Damage to trunk caused by carpenterworm feeding.

Carpenterworm male with wings spread to show orange, brown, and white hind wings.

Carpenterworm male with wings spread to show orange, brown, and white hind wings.

Carpenterworm female wings spread to show gray and white hind wings.

Carpenterworm female wings spread to show gray and white hind wings.

Carpenterworm, Prionoxystus robiniae, is a common wood-boring insect that can cause significant damage to several species of ornamental and fruit trees. Trees that carpenterworms are most likely to infest include apricot, ash, birch, cottonwood, American elms, black locust, maple, oak, fruiting pear, ornamental pears, and willow. Locations near riparian areas are more susceptible to infestation.


The larval stage of the carpenterworm is a large, wood-boring caterpillar that feeds within a tree’s inner bark on the sapwood. The earliest signs of an infestation are dark sap spots on the tree trunk. As the larvae feed within the sapwood, they expel frass (excrement) and sawdust out of the gallery entrance hole. This material is readily observable on infested tree trunks.

As the larvae grow, they expand the galleries. By the time the larvae are mature, the galleries are about 1/2 inch in diameter and 6 to 10 inches long; most of the gallery is vertical, except for the entrance area. Gallery entrances often are found in crotch areas of trees or in cracks and crevices in the bark. Adult females frequently lay eggs in areas of the tree that already are infested, and multiple galleries might arise in the same area, leading to extensive scarring on the corky bark tissue.

When mature, larvae can measure up to 1/2 inch in diameter and 2 to 3 inches long. They usually are greenish white with a dark brown head. They also have prominent hairs on their body, distinctive abdominal prolegs, and sharp, hooked legs on their thorax.

The adult carpenterworm is a large, robust moth with a wing expanse of about 3 inches. The forewings are mottled black and gray, making the moths difficult to see when they are resting on a tree trunk. The male moth is somewhat smaller than the female, and its hind wings are orange and brown while those of the female are off-white.


Adult female moths lay anywhere from 3 to 6 eggs in a sticky mass on the outer bark of an appropriate host tree. The females usually lay the eggs in bark cracks and crevices or near existing gallery entrances and other wounded bark surfaces. Female carpenter moths cannot fly far, so they tend to lay eggs on trees close to the one from which they emerged.

When the eggs hatch, the larvae immediately begin to bore into the sapwood. Larvae remain in the sapwood until they begin to reach maturity, at which time they bore into the heartwood. The entrance hole that the newly hatched caterpillar creates starts out as a small, rectangular opening but increases in size over time. As the larvae grow, they use the entrance holes to periodically expel frass and sawdust. There are anywhere from 8 to 31 instars (molts), and a larva takes 2 to 4 years to complete its development in California. The mature pupa wiggles to the surface of the gallery’s entrance hole. Adults emerge from the protruding pupal cases and soon mate. Moth emergence is erratic but typically occurs May through July with mating occurring shortly after emergence.


The extensive feeding of carpenter­worms in large branches can cause branches to weaken and break in high winds. The potential for dropping limbs is a major hazard in urban settings. Branch girdling by carpenter­worms, a process that disrupts a tree’s flow of nutrients and water, also can cause dieback of branches.


When monitoring for carpenterworm, look for dark sap spots on tree trunks, large quantities of frass and sawdust expelled from galleries, or scarred bark. In older infestations, you might see pupal cases protruding about two-thirds out of the tree bark. Discolored or oozing bark and limb dieback can have other causes, including inappropriate cultural practices, pathogens, and other types of wood-boring insects, including bark beetles (family Scolytidae), clearwing moths (Sesiidae), flatheaded borers (Bupre­stidae), and longhorned borers (Cerambycidae). Because each of these pests requires different management practices, you’ll avoid ineffective control efforts by accurately identifying the cause of unhealthy trees before taking action. For more information, see Pest Notes: Bark Beetles, Pest Notes: Clearwing Moths, and Pests of Landscape Trees and Shrubs.


Cultural and Mechanical Control

Provide trees with proper cultural care and protect them from injuries. Appropriate irrigation is especially important. Trees are better able to tolerate a few carpenterworms if they are kept vigorous.

If heavy carpenterworm infestations are suspected, have a qualified arborist inspect the trees. Because of the strong possibility of limb breakage as a result of carpenterworm feeding, heavily infested branches should be removed back to the point of attachment. In some cases, tree removal might be the best option.

It might be possible to kill the larvae by poking a long, sharp wire into the individual galleries, because a larva keeps its gallery open to the outside. This method is most practical when the infestation is small. However, it is difficult to know if the wire has penetrated far enough to kill the larva. To see if there is further larval activity after attempting to kill the larva, clear away any frass and sawdust material and mark the gallery site with a daub of paint. Recheck the site weekly to see if new frass material has been expelled. If so, the larva still is alive.

Biological and Chemical Control

A very successful biocontrol option is the use of a single treatment of the beneficial nematodes Steinernema feltiae or S. carpocapsae. While using nematodes might require additional monitoring and perhaps retreatment, they can be very effective in controlling carpenterworm infestations.

Except for nematodes, available insecticides are not effective against larvae beneath bark. Any other sprays must be aimed at adults, and successful control is difficult to achieve. Carefully monitor the tree bark at least once a week beginning in late winter, then promptly spray bark with an insecticide labeled for trunk and bark treatment when the first new pupal cases appear. There are very few pesticides that are labeled for carpenterworm. Homeowner products that contain a formulation of carbaryl* or permethrin are available and might provide some control of the emerging and egg-laying adults if the material is applied when susceptible insects are present. However, because of the prolonged life cycle and varying development rates among individual carpenterworms, it will be necessary to repeatedly inspect bark and respray at intervals over a period of about 4 years or longer.

Do not spray trees unless comprehensive resources—including improved cultural care and an improved growing environment—can be provided long-term to reduce the likelihood of carpenterworm reinfestation.

Nematode application

Apply nematodes with a squeeze-bottle applicator or 20-ounce oilcan at a concentration of 1 million or more nematodes per ounce of distilled water. First clear the tunnel entrance of frass, then insert the applicator nozzle as far as possible into each gallery. Inject the suspension until the gallery is filled or liquid runs out another hole; then plug the entrances with rope putty or grafting wax. Agitate the applicator frequently to keep nematodes suspended in the liquid. By adding 2% red or orange latex pigment, you can mark treated galleries. Thoroughly drenching bark with a nematode spray is more convenient than injecting tunnels, but spraying probably is less effective, because nematodes die on dry surfaces.

Make nematode applications during warm weather (at least 60°F) in spring or fall when carpenterworm larvae are actively feeding. Applications are most effective when larval openings are relatively large and moist. Because light and heat kill nematodes, make applications in the evening, especially in hot areas and sunny locations. Nematode-infected larvae can continue to feed and push frass from their tunnels for about a week before dying.

A second application 1 or 2 weeks after the first can increase the likelihood that carpenterworm larvae will become infected. To monitor the effectiveness of the treatment, check that the opening of each gallery is still plugged a week after application. Replug any that have been opened, and spray the plugged openings with bright-colored paint. Wait another week and check to see if these plugs are intact. If the gallery opening no longer is covered with paint, the larva has not died. Re-treat the gallery.

Nematodes are not commonly available in garden supply centers and usually must be mail ordered. They are perishable, so store them as directed on the label. Suppliers and more details on nematode use are available at More information about nematodes and their application also is available in Pest Notes: Clearwing Moths.

*As of August 1, 2020, pesticides containing the active ingredient carbaryl are restricted use materials in California. A valid pesticide applicator’s license is required for their possession and use. For more information see the California Department of Pesticide Regulation website.



Dreistadt, S. H. 2004. Pests of Landscape Trees and Shrubs, an Integrated Pest Management Guide. 2nd ed. Oakland: Univ. Calif. Agric. Nat. Res. Publ. 3359.

Dreistadt, S. H., and E. J. Perry. April 2004. Pest Notes: Clearwing Moths. Oakland: Univ. Calif. Agric. Nat. Res. Publ. 7477.

Johnson, W. T., and Lyon, H. H. 1991. Insects that Feed on Trees and Shrubs. 2nd ed. Ithaca: Cornell Univ. Press.

Seybold, S. J., T. D. Paine, and S. H. Dreistadt. Nov. 2008. Pest Notes: Bark Beetles. Oakland: Univ. Calif. Agric. Nat. Res. Publ. 7425.


[UC Peer Reviewed]

Pest Notes: Carpenterworm
UC ANR Publication 74105         PDF to Print

Author: P. M. Geisel, Statewide Master Gardener Coordinator, UC Cooperative Extension

Produced by UC Statewide IPM Program, University of California, Davis, CA 95616

PDF: To display a PDF document, you may need to use a PDF reader.

Top of page

Statewide IPM Program, Agriculture and Natural Resources, University of California
All contents copyright © 2021 The Regents of the University of California. All rights reserved.

For noncommercial purposes only, any Web site may link directly to this page. FOR ALL OTHER USES or more information, read Legal Notices. Unfortunately, we cannot provide individual solutions to specific pest problems. See our Home page, or in the U.S., contact your local Cooperative Extension office for assistance.

Agriculture and Natural Resources, University of California

Accessibility   Contact webmaster.