First Home Fixes logo

Home / Garage and Outdoors

How to Keep Rats Out of Your Yard and Garden

4 min read · Updated 28 November 2026 ·

Part of: Outdoors and garage

Simple illustration for the guide How to Keep Rats Out of Your Yard and Garden
Difficulty
Medium
Time
A weekend for the setup, then regular upkeep
Tools
Sealed bins, hardware cloth, traps, a rake and lidded trash cans
Call a pro if
You see rats repeatedly despite cleanup, find burrows near the foundation, or suspect an infestation inside the home.
In this guide
  1. Lock down food sources
  2. Secure trash and compost
  3. Remove shelter and hiding spots
  4. Seal structures and gaps
  5. Manage water sources
  6. Trap when needed
  7. Stay vigilant
  8. Protect the garden itself
  9. Common mistakes
  10. FAQ
  11. When to call a pro
Safety. Rats carry disease, so wear gloves when handling traps, droppings or nesting material, and wash hands thoroughly. Never handle a rat with bare hands, and keep traps away from children and pets.

Rats settle where they find food, water and shelter, and a yard that offers all three will keep them. Remove what attracts them and block their shelter, and they move on. How to keep rats out of your yard starts with food, storing pet food, birdseed and animal feed in sealed metal containers.

1. Lock down food sources

1. Store pet food, birdseed and animal feed in sealed metal containers.

2. Pick up fallen fruit and harvest ripe produce promptly.

3. Feed pets indoors or remove bowls right after meals.

4. Easy food is the number one reason rats stay.

2. Secure trash and compost

1. Use trash cans with tight, locking lids.

2. Keep compost in a sealed bin, not an open pile.

3. Avoid composting meat, dairy and greasy scraps.

4. Rinse cans regularly so residue does not attract scavengers.

3. Remove shelter and hiding spots

1. Clear brush piles, stacked lumber and dense ground cover.

2. Keep firewood raised and away from walls.

3. Mow regularly and trim overgrown areas.

4. Fewer hiding spots mean fewer places for rats to nest.

4. Seal structures and gaps

1. Block gaps under sheds and decks with hardware cloth buried a few inches deep.

2. Seal holes around pipes, vents and foundations.

3. Repair damaged vents and screens.

4. Rats squeeze through small openings, so seal thoroughly.

5. Manage water sources

1. Fix dripping spigots and irrigation leaks.

2. Empty birdbaths, pet bowls and standing water at night.

3. Improve drainage in soggy spots.

4. Rats need water daily, so remove it and they struggle.

6. Trap when needed

1. Set snap traps along walls, fences and runways.

2. Bait with peanut butter and secure the trap firmly.

3. Check traps daily and dispose of catches with gloves.

4. Trapping controls a small problem before it grows.

7. Stay vigilant

1. Watch for droppings, burrows and gnaw marks.

2. Act fast at the first sign before numbers grow.

3. Keep up the cleanup and sealing through every season.

4. Consistency is what keeps a yard rat-free long term.

8. Protect the garden itself

1. Fence vegetable beds with hardware cloth where practical.

2. Clear crop residue and weeds at the end of each season.

3. Raise compost and storage off bare soil where you can.

4. A tidy garden offers rats far less food and cover.

Common mistakes

FAQ

What attracts rats to a yard?

Food, water and shelter. Fallen fruit, pet food, open compost, birdseed, clutter and standing water are the biggest draws. Remove those and rats have little reason to stay.

Are rats in the yard dangerous?

They can carry disease and contaminate soil and surfaces with droppings. They also chew wiring and structures. Keep them out of the yard and away from your home's foundation.

How do I keep rats out of my garden?

Harvest ripe produce promptly, clear fallen fruit, fence beds with hardware cloth where practical, and remove nearby shelter like brush piles and dense ground cover.

Do rats come out during the day?

Rats are mostly nocturnal, so daytime sightings often mean a large or bold population. If you see them by day, step up trapping and cleanup quickly.

Follow us on
how to keep rats out of your yardrat controlrats in gardenkeep rats awayyard pest control

Related guides

Simple illustration for the guide How to Keep Deer Out of Your GardenGarage and OutdoorsHow to Keep Deer Out of Your GardenLearn how to keep deer out of your garden: fence smart, choose plants deer avoid, use repellents that work, and protect young trees.Simple illustration for the guide How to Keep Raccoons Out of Your YardGarage and OutdoorsHow to Keep Raccoons Out of Your YardLearn how to keep raccoons out of your yard: lock down trash and pet food, block den sites, and use light and motion to move them along.Simple illustration for the guide How to Keep Birds From Nesting on Your PorchGarage and OutdoorsHow to Keep Birds From Nesting on Your PorchLearn how to keep birds from nesting on your porch: remove nests legally, block ledges, and use humane deterrents that work.Simple diagram for the guide: How to Lay a Greenhouse BaseGarage and OutdoorsHow to Lay a Greenhouse BaseLearn how to lay a greenhouse base: level the ground, set a firm edging or slab pad and anchor the frame square.Simple illustration for the guide How to Remove a Tree Stump SafelyGarage and OutdoorsHow to Remove a Tree Stump SafelyLearn how to remove a tree stump safely: check the utilities, dig around the roots, cut them, rock the stump out and fill the hole so nothing settles.