Pigs are smart animals and can be housebroken. However, they are not very trainable. What they will do is root with their nose and chew on things. They have been known to root up areas of carpeting or yards. Like cats and dogs, pigs also need to be spayed or neutered.
Castration is major surgery.
If left intact, these animals are prone to scrotal hernias. Likewise, a sow in heat is noisy and may become very unruly and hard to handle. Pet pigs need yearly check-ups and vaccines. Since they are considered more of an exotic pet, it may be a challenge to find a veterinarian who will care for them. Also, their health requirements are the same as domestic pig breeds.