Here’s how to get rid of raccoons in your yard: take away what they came for.
Lock trash lids, bring pet food in before dark, clear fallen fruit and bird seed, and block the dry spaces under decks and sheds where they den.
Lights, sprinklers and smells only buy a few nights. Food and shelter are the real cause, the same as with what attracts possums, and the same fixes help you keep animals out of raised beds.
This post contains affiliate links. As an Amazon Associate, Gardening Lovy earns from qualifying purchases.
Start with the trash: a pair of raccoon-proof trash can lock straps keeps lids shut even when a bin is tipped over, which is the most common raccoon complaint.
Signs you have raccoons (and what each one means)
Raccoons work at night, so you usually meet the damage, not the animal. Read the clues first; each one points to a different fix.
| What you find in the morning | What it tells you | Fix first |
|---|---|---|
| Bins tipped, lids pried off, trash scattered | Raccoons are feeding from your garbage | Strap or lock lids; store bins in a garage |
| Empty pet bowls, spilled bird seed | Easy food left out overnight | Feed pets indoors; clean up under feeders |
| Sweet corn stalks pulled down, ears half eaten | Garden raid at harvest time | Low electric wire around the patch |
| Patches of lawn or mulch flipped over | Digging for grubs and insects | Remove food sources; protect beds |
| Droppings piled in one spot on a deck, roof or woodpile | A raccoon latrine, a health risk | Clean up safely and soon |
| Noises under a deck, shed or in the attic | A den, possibly with young | Check for babies, then seal |

What attracts raccoons to your yard?
Two things: easy food and a safe den. Take both away and raccoons have little reason to stay.
- Food: garbage, pet food, bird seed, fallen fruit and nuts, meat scraps in compost, fish ponds and ripe sweet corn.
- Shelter: the space under decks, porches and sheds, open chimneys, attic gaps, hollow trees and brush piles.
Bird feeders are a big draw. If you feed birds, the tips in our guide to attracting goldfinches work best with feeders taken in at night.
7 humane steps to get rid of raccoons
Work down this list in order. The first five remove the reason raccoons visit; the last two protect what’s left.
1. Lock down the trash
Oregon’s wildlife department advises fastening garbage can lids with a rubber strap. Better still, keep bins in a garage or shed until collection morning.
Rinse food containers and bag meat scraps before they go in the bin. Less smell means fewer visits.

2. Bring pet food in before dark
Feed pets indoors, or pick up bowls as soon as they finish. A bowl left on the porch overnight is the easiest meal in the neighborhood.
3. Clean up seed, fruit and nuts
Sweep up spilled bird seed each evening and hang feeders where raccoons can’t climb to them. Pick up fallen fruit and nuts daily while trees are dropping.
4. Close up the compost
Keep meat, fish, dairy and greasy scraps out of open compost piles. Use a closed bin with a lid for kitchen waste.
5. Block dens under decks and sheds
The University of California recommends screening open spaces under porches, decks and sheds with galvanized hardware mesh with 1/4- or 1/3-inch openings. Bury the bottom edge at least 6 inches deep and bend it outward 12 inches.
That L-shaped footer stops raccoons digging under the screen. Clear brush piles too; our guide on disposing of tree branches covers the options.

Before you seal anything, make sure nobody’s home. See the baby-raccoon section below, because sealing a mother out or her young in creates a far bigger problem.
6. Protect the vegetable garden
Sweet corn is a raccoon favorite; they climb the stalks and pull them down. Raccoons climb ordinary fences easily, so a low electric wire works better than a taller fence.
UC IPM suggests two wires around corn or melons, one 6 inches and one 12 inches above the ground. Have it running before the ears ripen, and follow the charger’s safety label.

For deer and rabbits in the same garden, the fencing advice in our deer-resistant garden guide pairs well with an electric wire.
7. Use lights, sprinklers and noise as backup
Motion lights, radios and motion-activated sprinklers can startle raccoons, but UC IPM notes they often work only for a few days before raccoons learn they’re harmless.
Use them to break a habit while you fix the cause, and move them every few days. A motion-activated sprinkler aimed at the path they use is the most memorable surprise.
What do raccoons hate to walk on?
Raccoons feel their way with sensitive front paws, so they tend to avoid prickly, loose or unstable surfaces. These can protect a small spot, but a hungry raccoon will cross almost anything.
| Surface | Where it helps | Catch |
|---|---|---|
| Chicken wire or plastic mesh laid flat on the soil | Raised beds, newly planted areas, bulbs | Plants grow through it; pin it down firmly |
| Plastic prickle (scat) mats | Bed edges, pots, deck rails, fence tops | Covers only a small area |
| Coarse gravel or sharp stones | Paths and borders next to beds | Slows them down; won’t stop them |
| Thorny prunings (rose, holly) | Around a single plant or pot | Short-lived and hard to weed |
| Crumpled aluminum foil | A quick test on one spot | Blows away; breaks down fast |

What smells do raccoons hate?
Lists online name ammonia, vinegar, hot pepper, garlic and peppermint. The honest answer: none has a good track record.
UC IPM reports that repellents haven’t been effective for raccoons, and that mothballs and home remedies have been tried “to no avail.”
Mothballs are also pesticides meant for sealed containers, not gardens. Save your money for a strap, a lid and a roll of mesh.
Baby raccoons: check before you seal a den
Raccoons have their young in spring, and dens under decks and in attics are often nurseries. Oregon notes the young stay in the nest for 3 to 7 weeks; Connecticut says they leave the den at about 8 weeks.
- If you can, wait until the family leaves together, usually by midsummer.
- Close every gap except one opening about 12 by 12 inches, then seal it after dark once the raccoon has gone out.
- Loosely stuff the last hole with newspaper. If it’s still in place after two nights, the den is likely empty.
Can you trap and relocate raccoons?
Often not legally. Connecticut has a state law prohibiting relocation, Oregon bans it too, and California requires written permission.
Moved raccoons also tend to come back or become a neighbor’s problem, and a new raccoon soon fills an empty den.
Check your state or provincial wildlife agency first, and call a licensed wildlife control operator for a raccoon inside your house.
How to clean up raccoon droppings safely
Raccoon feces can carry raccoon roundworm, and young children are most at risk. The CDC notes that the eggs take 2 to 4 weeks to become infectious, so prompt cleanup lowers the risk.
- Wear disposable gloves; in attics or closed spaces, add a respirator with HEPA filters.
- Bag the droppings and any soiled material, then put it in the trash, or bury or burn it where allowed.
- Pour boiling water over hard surfaces like decks and patios.
- Wash your hands well and keep children and pets away from the area.

Tools that help
Three things cover most raccoon problems. For mesh, choose galvanized hardware cloth with 1/4-inch openings in the heaviest gauge you can find; chicken wire is too weak for deck skirting.

Trash can lock straps
Hold lids shut on wheeled bins, even when a raccoon tips them over.
Check price on Amazon
1/4-inch hardware cloth
Seals the gaps under decks and sheds. Bury the edge 6 inches and bend it out.
Check price on Amazon
Motion-activated sprinkler
A short-term scare while you remove food and dens. Move it every few days.
Check price on AmazonFrequently asked questions
What is the fastest way to get rid of raccoons?
Remove the food tonight: strap trash lids, bring in pet food and bird seed, and pick up fallen fruit. A motion-activated sprinkler or light can break the habit for a few nights while you block dens under decks and sheds, which is what keeps them away for good.
What do raccoons hate the most?
Losing easy food and shelter matters most. They also dislike sudden water sprays, bright lights and prickly or unstable footing, but these lose their effect within days. University of California testing found smell-based repellents haven’t been effective for raccoons.
Will raccoons leave on their own?
Often, once there’s nothing to eat and nowhere to den. A mother with young under a deck or in an attic usually moves her family by midsummer. Remove food sources first, then seal the den only after you’re sure it’s empty.
Does vinegar or ammonia keep raccoons away?
Not reliably. Strong smells may make a raccoon hesitate for a night or two, but UC IPM reports that repellents and home remedies haven’t worked for raccoons. Ammonia fumes can also harm pets and plants, so lock up food and block dens instead.
Is it legal to trap and relocate a raccoon?
In many places, no. Connecticut and Oregon prohibit relocating raccoons, and California requires written permission. Check your state or provincial wildlife agency, and hire a licensed wildlife control operator for raccoons inside your home.
Are raccoon droppings dangerous?
They can be. Raccoon feces may carry raccoon roundworm, which is most dangerous to young children. Clean latrines promptly with gloves, bag the waste, treat decks with boiling water and wash your hands well.
Conclusion
Raccoons are clever, but they’re also practical. When a yard stops paying off in food and shelter, they move on.
- Strap trash lids and bring pet food and bird seed in at night.
- Screen under decks and sheds with buried hardware cloth, after checking for babies.
- Protect sweet corn with low electric wires at 6 and 12 inches.
- Treat lights, sprinklers and smells as short-term help only.
If you only do one thing: lock your trash cans tonight.
Recommended reading
- What attracts chipmunks to your yard
- How to get rid of ground squirrels
- Natural garden pest control methods
- How to get rid of wasps without killing them
I am an enthusiast who loves plants very much and I do a lot of research online as well as outside in gardens and nurseries. I also strive to be as accurate as possible in my research and my articles. I have been involved in gardening for a long time and truly enjoy it. Read more about me and how I research my guides, or join me on Facebook.