How 2 remove speedo gear

My speedo stopped working the other day and I have determined that my speedo gear is not working right. I have a new cable but it is simply not spinning when driving. I guess need to remove & replace the gear in the tranny. Are there any tricks to doing this? Do I need a drain pan handy?