I had a Yamaha Grizzly in the shop with a bad throttle cable. Whenever the temp dropped below freezing it would get stuck. There was obviously some moisture in the cable somewhere. When I checked it out I discovered that the jacket on the cable was broken in the middle and it would need to be replaced.
I removed some of the plastic body work and took the covers off the throttle control on the handle bar and the cable cover on the side of the throttle body. To provide a little slack in the cable to remove it I opened up the throttle butterfly and stuck a screwdriver in there to hold it open.
Once there is a little slack in the cable it is a simple matter to twist the cable end around and slide it out of the slot.
The end on the handle bar comes apart in the same way. Get some slack in the cable and twist it around so that it can lift out of the slot. Once the cable ends are free the outside housing unscrews from each end. When installing the new cable remember to adjust the cable free play and use the lock nut to hold it in place.
This last photo shows the old failed cable assemble and the new replacement. There are two pieces of plastic tubing slipped over the cable housing to protect it from abrasion. Where the two pieces meet in the middle the housing broke. I don't understand why Yamaha made it this way? If the outer tube was one piece it would avoid that kink in the middle. When I installed the new one I put a few wraps of electrical tape around it to try and avoid this problem.