Last spring I had onion plants turn yellow and when I pulled a few up, they were infested with maggots! How can I prevent this?
Cover your emerging onion crop with a fine mesh netting. Seal it by mounding soil around the edges. The onion maggot likes to lay its eggs at the base of plants, so the netting should prevent that. You should also keep mulch away because the insects like decaying organic matter, and make sure you completely harvest your onions as the season progresses. Onion maggots are usually a problem in very rainy periods, so these precautions may be unnecessary if you have a dry season.