Carrot flies are pests which can invade crops and feed on their roots, rendering them inedible. Although carrot flies may not be visible upon first inspection, by cutting through roots, deep tunnels filled with creamy-yellow maggots can often be found.
Neem oil can be used to treat carrot flies. The best way to do so is to use a neem oil spray. The odour from neem oil repels carrot flies. It is also effective at killing flies that ingest the neem oil in your garden.