There isn't a best way. They will be steel into aluminium so if there's corrosion they're likely to be stuck firmly in place. However, my first shot would be to look on the outside of the lower unit to see whether the holes they are fitted into pass right through so that they can be drifted from the outside. If not, grip them tightly using a vice grip wrench and attempt to rotate them. If they move, you will be able to pull upwards while rotating the pin and it should work free. If, say, the ones in the lower unit are stuck try removing the ones in the leg - you may be lucky. If they all appear stuck, you've got a few options. My first would be a gentle tap sideways on the pins along with something which will sneak down any space to lubricate the pin withing the casing - oil, diesel, white spirit or WD40 would all be suitable. Applying heat may also help.
If they a well and truly stuck you may be able to carefully mark the casing on the outside and drill a hole to allow a drift to be used to drive them out. If you do this, be sure to support the area close around the pins while hammering the drift. If all fails, drill them out and replace them with new ones.