Sow carrots after late-spring to avoid the first generation of carrot fly larvae. Harvest the roots by late-August, before the second generation of larvae emerges.
Carrot fly can detect the scent of carrots from a mile away; sow the seed thinly, as the process of thinning the seedlings releases the carrot's scent. Plant strong-smelling crops, such as garlic, onions, shallots and leeks adjacent to the carrots.
Follow a strict crop rotation plan, avoiding growing carrots on the same site in consecutive years, and place horticultural fleece over the seedlings, which will provide a physical barrier against the pest.
Some carrot varieties - 'Resistafly', 'Sytan' and 'Fly Away' - are less prone to attack.