Electrocution traps are effective—and more humane than snap traps. These battery-operated traps (not to be confused with ultrasonic devices) ensure that rodents die quickly and also make getting rid of dead animals easier.
Snap traps come in different sizes for rats and mice. Use a trap rated for rats for roof rats (which sometimes are mistaken for mice, as they are grey and “cuter” than Norway rats). A too-small trap may only wound the animal. Always keep snap traps out of the reach of children and pets.
Mice are easy to trap using peanut butter as bait. Trapping rats takes more patience.