The first step is to correctly identify the species because some anobiids, like the drugstore beetle and cigarette beetle, attack dry foodstuffs. Once you have located the infested wood, find the exit holes and check them again after a few months to see if any new holes have been formed. If so, it is best to call a pest management specialist because dealing with an anobiid beetle infestation can be a complex process. A specialist can come out and determine the scope of the problem and recommend the best solution. Sometimes the problem can be solved by simply removing the infested piece of wood.
Physical measures can be used to prevent anobiid beetles from moving in in the first place. The most important thing is to control the level of moisture in high-risk areas (e.g., crawl spaces, attics, and basements). Effective measures for reducing the risk of infestation include repairing leaks in the roof and plumbing, fixing drainage issues, and improving ventilation.