Animals In Islam
There’s no prohibition on keeping a pig as a pet. As with any other animal, you just need to make sure that your living space remains clean. Please keep in mind that purity/tazkiya has the central importance in Islam.