There's no chemical control or resistant varieties. Onion fly - onions are particularly prone to this larval fly but shallots, leeks and garlic may also be attacked. The larvae eat the roots of ...
Leeks repel carrot fly and carrots repel onion fly and leek moth. Make sure companion plants are planted at the same time as your edible crops to prevent pests from getting a foothold.