Another alternative is to use a poisoned bait of some kind to kill the animal. For small rodents the commercially available rat and mouse poisons would work just fine. I wouldn't recommend poison for larger animals as it would difficult to get the right lethal dosage. Something else to consider is that many rat and mice poisons are based on blood thinners so the animal bleeds to death. Having been on blood thinners and having had the unpleasant experience of bleeding because of them I just can't bring myself to use this method. I'm also just not sure of how messy it is. The bleeding could all be internal or they could bleed out, I honestly don't know.
A method my uncle used for mice is uncooked instant mashed potatoes. The mice eat the instant potatoes which expand in their stomach which crushes their organs. I imagine this might work for other small rodents.
This next method is not recommended but for the sake of completeness I'll mention it. A different uncle killed of a family of groundhogs using chlorine gas. He blocked off all the entrances to the burrow except one. He then poured ammonia and bleach down the hole which generated chlorine gas and suffocated/burned the lungs of the groundhogs. This gas can do the same to people and to use it would be exceptionally risky if not downright stupid.
There are many available insect baits that all work well. Some of these are liquids that illustrate one of the main drawbacks of poisoned baits. The ones that look like honey have appeared enticing to children and they end up getting poisoned instead. This is the main draw back of poison; it is less specific than aiming a gun and can kill things you don't intend to such as domestic animals, beneficial insects and humans.