Woodboring beetle

The term woodboring beetle encompasses many species and families of beetles whose larval or adult forms eat and destroy wood (i.e., are xylophagous). In the woodworking industry, larval stages of some are sometimes referred to as woodworms. The three most species-rich families of woodboring beetles are longhorn beetles, bark beetles and weevils, and metallic flat-headed borers. Woodboring is thought to be the ancestral ecology of beetles, and bores made by beetles in fossil wood extend back to the earliest fossil record of beetles in the Early Permian (Asselian), around 295-300 million years ago.

Ecology
Woodboring beetles most often attack dying or dead trees. In forest settings, they are important in the turnover of trees by culling weak trees, thus allowing new growth to occur. They are also important as primary decomposers of trees within forest systems, allowing for the recycling of nutrients locked away in the relatively decay-resilient woody material of trees. To develop and reach maturity woodboring beetles need nutrients provided by fungi from outside of the inhabited wood. These nutrients are not only assimilated into the beetles' bodies but also are concentrated in their frass, contributing to soil nutrients cycles. Though the vast majority of woodboring beetles are ecologically important and economically benign, some species can become economic pests by attacking relatively healthy trees (e.g. Asian longhorn beetle, emerald ash borer) or by infesting downed trees in lumber yards. Species such as the Asian longhorn beetle and the emerald ash borer are examples of invasive species that threaten natural forest ecosystems.

Invasion and control
Woodboring beetles are commonly detected a few years after new construction. The lumber supply may have contained wood infected with beetle eggs or larvae, and since beetle life cycles can be one or more years, several years may pass before the presence of beetles becomes noticeable. In many cases, the beetles will be of a type that only attacks living wood, and thus incapable of "infesting" any other pieces of wood, or doing any further damage.

Genuine infestations are far more likely in areas with high humidity, such as poorly ventilated crawl spaces. Housing with central heating/air-conditioning tends to cut the humidity of wood in the living areas to less than half of natural humidity, thus strongly reducing the likelihood of an infestation. Some species will infest furniture.

Some beetles invade wood used in construction and furniture making; others limit their activity to forests or roots of living trees. The following lists some of those beetles that are house pests.
 * Ambrosia beetle
 * Common furniture beetle
 * Deathwatch beetle
 * Flat-headed wood-borer
 * Powderpost beetle (Ptinidae, Bostrichidae)
 * Old-house borer