Actualizar select2 después de eliminar un elemento
var newArray = [];
let newData = $.grep($('#select2').select2('data'), function (value) {
return value['id'] != id_to_remove;
});
newData.forEach(function(data) {
newArray.push(+data.id);
});
$('#select2').val(newArray).trigger('change');
Beautiful Buzzard