lsof -P | grep ':PortNumber' | awk '{print $2}' | xargs kill -9 Replace PortNumber with the actual port that you want to kill