When they die
Inevitably, with shorter life spans than humans and limited understanding and treatments in pig healthcare, ‘pet’ pigs will usually die before us. Sadly even when a ‘pet’ in the UK they have to be dealt with in the same way as farmed pigs which means you cannot bury them on your own land. Instead you must use an approved transporter who will take your pig to an approved ‘disposal’ facility. More details here:
Clearly this can be heart-breaking but sadly unless the law is changed, pigs are seen solely as livestock and as a disease risk.