If you are sure it's knackered and needs changing, then I usually use a coarse thread wood screw to grip the seal and extract it.
The only reason I suggest make sure it's knackered first is that you are likely to damage it in the process of extraction so ensure you have a replacement to hand or accept gun may be off the road until you get one delivered. By the way I think there may be different thicknesses so best check what type you need.
Refitting is simply a case of gently pressing new seal into the port square on with gun cocked and safely held back by trigger and bear trap and then gently return home and let the barrel press the seal home for you.
Dave