As some mentioned the length of the select element decreases when removing an option. If you just want to remove one option this is not an issue but if you intend to remove several options you could get into problems.
Some suggested to decrease the index manually when removing an option. In my opinion manually decreasing an index inside a for loop is not a good idea. This is why I would suggest a slightly different for loop where we iterate through all options from behind.
var selectElement = document.getElementById("selectId");
for (var i = selectElement.length - 1; i >= 0; i--){
if (someCondition) {
selectElement.remove(i);
}
}
If you want to remove all options you can do something like this.
var selectElement = document.getElementById("selectId");
while (selectElement.length > 0) {
selectElement.remove(0);
}