Certain substances and practices can help keep snails and slugs away from your garden. These include using barriers like copper tape, crushed eggshells, or diatomaceous earth, as well as applying natural repellents like coffee grounds, vinegar, or plants with strong scents such as lavender or mint.