On the first one, it's a circlip or C-clip. To remove, get a screwdriver between the pin and the clip (that's what those cut outs in the clip are for) and lever it outwards. Watch it carefully as it flies across your garage and disappears under the beer fridge. You'll need it later

. Replacement is best done with a large pair of pliers or swan-necks to push the clip back into the groove. With the clip off, the pin should just push or pull out. Seriously though, they can ping across the room a bit. A rag tied around the general area before you start levering will contain it's more extreme tendencies.
The ball joint is more mysterious. It looks to be permanently fitted. you may have to unscrew the linkage pushrod and leave the ball joint itself attached to the lever.