In Saheeh al-Bukhari (2222) and Saheeh Muslim (155), it is narrated that Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said:
“By the One in Whose hand is my soul, soon the son of Maryam will descend among you as a just judge; he will break the cross, kill the pigs and abolish the jizyah, and wealth will become so abundant that no one will accept it.”
Ibn Battaal (may Allah have mercy on him) said:
The reason for breaking the cross and killing the pigs is because they are part of the religion of the Christians who are fabricators and transgressors. Hence the Prophet told us that ‘Eesa (peace be upon him) will change what they attributed to him, as Muhammad changed it and told them that they were following falsehood in that regard. This indicates that ‘Eesa will come to confirm the corrections introduced by the law of Muhammad, and will judge with justice between people.
End quote from Sharh Saheeh al-Bukhari, by Ibn Battaal, 6/604
An-Nawawi (may Allah have mercy on him) said:
This indicates we should object to evil deeds and remove them, and remove the symbols of evil, and killing the pigs comes under this heading. It is also indicative of the view favoured by our madhhab and that of the majority, which is that if we find a pig in non-Muslim lands or elsewhere, and we are able to kill it, we should kill it; and it proves false the odd opinion held by some of our companions and others, who said that pigs should be left alone if they are not causing any harm.
End quote from Sharh Muslim, 11/221