I'm gonna disagree with Simon a bit. I have replaced several and the use of a pickle fork can damage the grease boot fairly easily. I have found that the easiest way is to pull the cotter pin and loosen the nut up to the top of the bolt. Then use a hammer and smack the top of the bolt a few times really hard. Don't worry about the threads, you can dress them by simply removing the nut. Also, if you put the nut flush with the top of the bolt, you have a better striking surface.
Once it's off, take a measurement from the adjustment sleeve (not the lock nut cause that'll probably be replaced) to the ball-end of the joint. Use a little geometry to determine a point to measure to as there is not a good 90 degree angle between the adjustment bolt and the mount bolt.
Loosen the adjustment nut and spin out the tie-rod end. You can then place the lock bolt back into the exact position where it was (should be obvious on the threads of the old TR-end) and match it up to your new one (measure from ball-joint end cause the adjustment bolt may be a different length). Mark the new threads with a marker or piece of tape so that when you spin in into the adjustment sleeve, you can get it the exact location the old one was. Once in place, spin down the lock nut and tighten her up. Reinstall into the c-link or wherever it came from. Double check your measurement from before. Even if you are a thread off or so, your alignment should be fine enough so that you need not rush out for an alignment if you don't want to.