Structural pests are often effectively deterred when openings to potential hiding places are sealed and debris and refuse are eliminated. Crops are sometimes protected from harmful pests through diverse planting techniques. Crop rotation, for example, prevents the development of fungus and bacterium populations. Open-area planting relies on the wind to hinder flies and other insects that damage vegetable crops. Physical or mechanical control methods are effective against some pests.
Traps are another mechanical method of pest control.
Some traps are designed to either kill or capture rodents and other vertebrate pests. Netting and metal shields are used to keep birds from damaging fruit crops or from roosting on buildings. Electrical light traps attract insects and electrocute them. In some buildings, fans are installed above doors to prevent the entry of flying insects. An area of pest-control research that has received much attention in recent years involves baiting traps with the pest's own sex attractants, or pheromones.