If you have ever watched a woodpecker searching for food, it is quite a marvelous sight, but if the material he is digging into is your home, you might not find it quite as awe inspiring. Woodpeckers look for insects and worms that are living underneath the surface of the wood, so usually, if a woodpecker is attacking your home, it is quite possible that you have a problem with wood-boring insects. This is not to say that the woodpeckers aren’t a problem, but solving one problem might solve the other.
Killing bugs using pesticides should remove the food source for the woodpeckers and make it so they look somewhere else for food.
Unfortunately, the holes left behind by a woodpecker will allow additional insects easy access to your home. Woodpeckers can also get into a habit of returning to the same place looking for food, so as soon as possible, you should cover up any holes you can find.
You can also install some plastic netting over areas where woodpeckers have been damaging your home to make it so they can’t access those areas again.