To get rid of carpenter bees, find the holes where they fly in and out and spray bee and wasp contact formula directly into the holes. The best time to spray is at night when the bees are inactive, and some sprays recommend to immediately fill the hole with caulking.
Thoroughly inspect all untreated, unfinished wood structures for carpenter bee holes. They are usually about 1/2 inch in diameter, nearly perfectly round and located on the underside of surfaces such as eaves, decks, siding, fence posts and window frames. Keep an eye out for piles of "sawdust" that come from the bees boring through the wood.
Spray the inside and surrounding area of each hole with a residual insecticide, following the directions and precautions on the label closely. Certain sprays recommend a second application after four weeks to ensure all the bees are killed and that more don't return. An alternative to aerosol spray is insecticide dust which the bees walk through and carry farther into the nest than spray can reach. Apply the dust as far into the openings of the holes as possible.
When the fall season comes, prevent further infestations by plugging up any holes or cracks with caulking, cork or putty. In the spring, spray untreated wooden surfaces with insecticide every two to four weeks. Carpenter bees may bore into old varnish or paint, so keeping the house freshly painted can help prevent them as well.