Coffee grounds get rid of moles in your yard due to their strong smell. Be careful, though! According to the article from the UC Master Gardener Program of Contra Costa County, coffee can cause nitrogen depletion and harm your grass or plants.