Moles don't like the taste and smell of red pepper. Consequently, using red pepper in your garden can annoy moles enough to dissuade them from dwelling or digging in the area.
To utilize this method, you can chop up a red pepper and sprinkle it directly into the soil or apply powdered red pepper, especially around areas where mole activity is noticeable.