Swallows, while often enjoyable to watch, can become a nuisance, building mud nests that are a potential health hazard, depositing their droppings in unlikely locations, and carrying pests such as mites and swallow bugs. Swallows are protected under the Migratory Bird Treaty Act of 1918, and thus, it is illegal for you to harm nesting swallows or their young in any way without a permit issued for compelling reasons. Focus on preventing swallows from nesting in your locale instead.
Knock down any old nests that are visible, and remove their traces by washing away the mud with water. Otherwise, swallows will tenaciously seek to return to old nests and rebuild them -- particularly during breeding season.
Physically block swallows from forming nests by covering any part of a building suitable for nesting with netting. You must secure netting before swallows start forming their nests, using hooks or staples.
Install permanent projectors of wire or plastic along building surfaces, both vertically and horizontally. The spiky surface may make landing uncomfortable for the birds, and may discourage nesting.
Cover any rough surfaces, which are preferred by the birds for nesting, with smooth material such as glass or fibreglass. These surfaces make it difficult for the birds to find secure footing or a stable attachment for their nest, so they will go elsewhere.