Coffee grounds may deter some species of slugs but their effectiveness as a deterrence is varied––some gardeners have found that snails and slugs just speed up to get past the grounds quickly. Caffeine sprays have been found to be effective when sprayed on leaves (snails don’t like such leaves)(Nature 2002), so in some cases it may be more effective to use the coffee grounds diluted in water as a spray. Using coffee grounds to deter snails is worth trying but realize it can impact beneficial insects as well, so keep an eye on how it works for your garden. To avoid acidity build-up in the soil, use used coffee grounds (neutral pH) rather than fresh (acidic).