The best way is to find the primary source of attraction of pests to your garden and eliminate it.