It is legal to kill moles in a yard, but property owners should verify that they are moles and not pocket gophers, which are an endangered species, before beginning any attempts at extermination. Trapping, flooding and poisoning are recommended by most government agencies.
If an area attracts moles, it is likely that no matter what methods are used, the moles will come back. Traps are the least recommended type of control method due to how difficult they are to set up and the fact that moles can often spring poorly set traps. Repellents are not a recommend form of removal for moles as none of them have proven to be reliable across all areas and climates. Flooding has proven effective in most locations.