Rats can quickly turn a healthy garden into a constant cleanup job when food, water, and shelter are easy to find.
If you want to rat proof your garden, use layers: remove what attracts them, block entry points, and keep the space less inviting over time.

Start with sanitation, then add physical barriers and deterrents so rats have fewer reasons to stay.
Stop What Attracts Rats First

Reduce rat activity by removing easy meals and hiding spots.
Keep your garden tidy to give rats fewer reasons to settle in.
Remove Fallen Produce And Overripe Crops
Pick ripe fruits and vegetables promptly.
Clear anything that drops to the ground, since fallen produce is an easy food source for rodents.
Secure Compost, Bird Seed, And Pet Food
Use a covered compost bin.
Avoid adding meat, dairy, or pet waste to the pile, as these attract rats.
Keep bird seed in enclosed feeders.
Never leave pet food or water outside after feeding time.
Cut Back Cover And Reduce Nesting Spots
Trim dense groundcover and remove brush piles.
Store lumber or pots off the soil to reduce hiding spots and make your garden feel less safe for rodents.
Build Barriers That Actually Work

Tight, buried, and well-maintained barriers stop rats from digging, squeezing, or climbing into your beds.
Use Hardware Cloth Around Beds And Fences
Install 1/4-inch hardware cloth, not chicken wire, around raised beds and fence bottoms.
Bury mesh to create a tougher edge and guard your garden perimeter.
Protect Vulnerable Crops With Raised Beds And Covers
Raised beds help shield roots and stems from burrowing.
Add low tunnels, mesh lids, or cloches to protect crops that attract the most attention.
Check Gates, Gaps, And Burrowing Points
Inspect gate bottoms, fence corners, and openings near sheds, decks, or irrigation lines.
Fill small gaps quickly, and watch for soft soil along borders that can become burrow points.
Use Deterrents And Control Methods Carefully

Deterrents work best when your garden is already clean and blocked off.
Pick targeted methods that fit your space.
Try Peppermint Oil Spray And Strong-Scented Herbs
Spray peppermint oil and plant strongly scented herbs around edges and entry points.
Herbs like mint, rosemary, and sage can make beds less appealing, since rodents avoid strong smells.
Where Ultrasonic Repellers Can Help
Use ultrasonic repellers in small, enclosed areas where coverage is predictable.
They can complement other steps, but should not be your only fix.
Choose Humane Mouse Traps For Targeted Removal
Set humane mouse traps or live-catch traps along runs.
Check traps frequently and relocate any captured animal according to local rules.
Make The Garden Less Safe For Rodents Long Term

Change the habitat so rats have a much harder time reestablishing a routine.
Encourage Natural Predators Without Creating New Problems
Attract local birds of prey by keeping the yard open and avoiding clutter that shelters rodents.
If you use cats or dogs as deterrents, consider their safety and your neighbors.
Adjust Mulch, Water, And Seasonal Maintenance
Keep mulch thin near beds and fix leaky spigots.
Avoid standing water after rain or irrigation, and clean up seasonally to reduce cover during nesting times.
Monitor For Fresh Droppings, Runs, And Gnawing
Look for fresh droppings.
Watch for narrow trails in grass and gnaw marks on wood, mesh, or fruit.
Early signs help you respond before a small problem grows into a larger colony.