Depends entirely on your surrounding environment and how much damage you care to do to what ever is behind the intended target. Personally, I use a 223 pretty much exclusively to dispatch them in my yard. I do live on the edge of town, but my neighbors don't mind. I've worked up a load that uses around 8 grains of green dot behind a 40 or 50 gr vmax. It runs around 2000 fps, sounds about like a 22 mag rimfire, but gives me 1/2 moa accuracy. The projectiles still expand well enough at that speed that when they exit, the do so in pieces. I've taken that load out west and used it on prairie dogs as well. Works great out to about 175 yds. Starts dropping pretty fast after that. I've probably made hits out to about 225 yds with it, but past that 175 number, it does tend to do more wounding than killing. Inside of 100 yds on a ground hog, its bang flop, pause, kick kick kick....
Now, if you need to open a door or window and THEN take the shot, I think you're probably looking more at a 12 ga. I've done it with a 22rf, but I made sure to use an auto because I know it would take more than one hit on a running target. That one still made it to its den, but I put enough holes in it that it never came out again.