Vegetable pests Not sure it is this pest? Use the Pest Finder in anee.io ›

Leafminer in Vegetables: How to Spot the Tunnels and Stop Them

Leafminer is a tiny fly whose maggots eat tunnels inside vegetable leaves. The white winding lines look like scribbles, and a heavy attack can strip a crop of its leaves. This page shows how to spot leafminer early and how to control it without killing its natural enemies.

Liriomyza sativae, Liriomyza huidobrensis 7 min read Updated October 18, 2026 By the anee.io agriculture team Read it all with Libre + Anee
A small black and yellow leafminer fly, Liriomyza, resting on a young leaf
Photo: Federico Figueroa Cabezas, CC BY, via iNaturalist

What Is Leafminer?

Leafminers are small flies of the genus Liriomyza. Two of them matter in Philippine vegetables: the vegetable leafminer (Liriomyza sativae) and the potato leafminer (Liriomyza huidobrensis). A third, the American serpentine leafminer (Liriomyza trifolii), attacks onion in Nueva Ecija, Nueva Vizcaya and Pangasinan.

They feed on many crops. L. sativae likes legumes, plants of the daisy family and the potato family best, yet it has also been found on capsicum, carrot, cucumber, lettuce, melon, onion, tomato and zucchini. Heavy attacks cause leaf loss, so the fruits are exposed to sunscald and the plant tires.

Quick facts
FactDetails
NameLeafminer
Scientific nameLiriomyza sativae, Liriomyza huidobrensis
KindInsect
Crops it attacksBeans, tomato, cucumber, melon, squash, onion, potato, lettuce and other vegetables
Local namesNone recorded
Where it strikesLeaves
When it strikesIt can attack from the seedling stage to harvest, and it spreads fastest in warm, dry weather and where sprays have killed its natural enemies.
Life cycleThe female punctures the leaf to feed and lays eggs inside it. The eggs hatch in 2 to 4 days, and the larvae tunnel between the leaf surfaces. Then they drop to the soil to pupate. The cycle takes about 2 weeks in warm weather.

How to Identify Leafminer

Hold a leaf to the light. The larva is a tiny pale maggot inside the leaf, and its path shows as a white, irregular or coiled tunnel, with a thin black line of droppings inside. Small white puncture dots on the leaf are the feeding and egg laying marks of the adult fly. The adult is a small black and yellow fly, about 1.7 mm for a female. Disease spots on leaves do not form winding tunnels, so a tunnel means leafminer.

  • White, winding or coiled tunnels on the leaves, with a thin black line inside.
  • Many tiny white puncture dots on the leaf surface.
  • Mined leaves that dry, turn brown and fall off.
  • Fruits that burn in the sun after the leaves are lost.
  • Young plants that stop growing or die in a heavy attack.
Do not confuse it with

Leaf spots from fungus or bacteria are round or angular, not winding. Damage from a thrips attack looks silvery, with no tunnel. Winding white tunnels always mean leafminer larvae.

How Leafminer Hurts Your Crop

The Pacific Pests fact sheet says a heavy attack causes plant stress, water loss, leaf drop, sunscald on the fruit, and even the death of young plants. Mined produce can also be rejected by buyers.

A study on onion in Nueva Ecija and Nueva Vizcaya showed why careless spraying backfires. Where farmers sprayed less, up to 41 percent of the larvae were parasitized by wasps, against up to 18.6 percent where they sprayed more. So the natural enemies already work for you, and strong sprays kill them. We found no Philippine action threshold in the sources we read.

How to Control Leafminer

  1. Inspect seedlings and the first true leaves for tunnels before you plant. Do not transplant mined seedlings.
  2. Control weeds and plow the soil before planting, so the pupae in the soil are exposed. Avoid planting leafminer hosts one after another in the same plot.
  3. Handpick mined leaves, or crush the larva inside the tunnel, when the attack is light.
  4. After harvest, collect the crop remains and burn them or bury them deep. Mulch the soil in high value crops, as Pacific Pests advises.
  5. Spare the parasitic wasps. Pacific Pests names Chrysocharis, Neochrysocharis and Diglyphus as helpful ones, and an onion study found wasps parasitized up to 41 percent of the larvae. See the integrated pest management guide.
  6. Use yellow sticky traps to watch the adult flies. Rotate with a crop that the fly does not like, such as corn.

When a Spray Makes Sense

Choose a spray only when the tunnels keep spreading. Avoid broad spectrum insecticides such as pyrethroids, carbamates and organophosphates, because they kill the wasps and the leafminer comes back worse. Follow the FPA registered label.

Active ingredients whose Philippine labels name it, best first. Always follow the label of an FPA registered product.
Active ingredientIRAC groupOn Philippine labels
AbamectinIRAC 6A first choice. Registered products name it on onion, potato, tomato and watermelon.
CyromazineIRAC 17A first choice. Registered products name it on onion, potato, tomato, watermelon and more.
SpinetoramIRAC 5A first choice. Registered products name it on onion, potato and tomato.
CyantraniliproleIRAC 28A first choice. Registered products name it on onion and tomato.
Cartap hydrochlorideIRAC 14A sound second choice. 73 registered products name it on potato.
Abamectin plus spiromesifenIRAC 6 plus 23A sound second choice. Registered products name it on onion, potato, tomato and watermelon.
TetraniliproleIRAC 28A sound second choice. 1 registered product names it on tomato.
ChlorfluazuronIRAC 15Older or broad chemistry: a last resort. 1 registered product names it on watermelon.
On labels for it, but not advised

These are on Philippine labels for it, but we leave them off the list above, for the reasons below.

  • Carbosulfan and carbaryl: Highland leafminers survive old carbamates, and the spray kills their wasps, so mines spread faster.
  • Bifenthrin plus imidacloprid, acetamiprid plus bifenthrin, cypermethrin and fenvalerate: Pyrethroids kill the wasps that keep leafminer down, and it comes back worse.
  • Fenthion, malathion and profenofos: Leafminers survive many organophosphates, and the spray kills their wasps, so mines spread faster.
  • Fenobucarb (BPMC) plus chlorpyrifos: Two old broad chemicals that leafminers survive. They kill the wasps and mines spread faster.

Resistance. The pea leafminer (Liriomyza huidobrensis) of highland potato and vegetables survives many organophosphates, carbamates and pyrethroids. Keep one group per window of 2 to 3 weeks: abamectin (6), then cyromazine (17), then spinetoram (5) or cyantraniliprole (28).

Spray safely

Use only products registered with the Fertilizer and Pesticide Authority, and follow the label for the rate, the timing and the protective clothing. Switch to a different insecticide group next time, so the pest does not learn to survive it. Our guide to integrated pest management explains how.

Keep It Out Next Season

  • Check seedlings and first leaves for tunnels, and never transplant mined seedlings.
  • Plow the soil and clear weeds before planting, so the pupae in the soil dry out or get eaten.
  • Pick and crush mined leaves while the attack is light.
  • Bury or burn crop remains right after harvest, and do not leave an old crop beside a new one.
  • Yellow sticky traps catch the adult flies and show when they build up.
  • Rotate with a crop the fly does not like, such as corn or rice.

Natural Enemies and Biological Help

  • Parasitic wasps such as Diglyphus, Chrysocharis and Neochrysocharis kill many larvae in the mines. Broad sprays kill them and leafminer comes back worse.
  • Neem works on the larvae with less harm to the wasps.

Not Sure What You Are Seeing?

Take a clear photo of the insect, the damage and the whole plant, then ask Anee, the smart farm technician in anee.io, in Tagalog or English. Anee tells you what it most likely is and what to do at the age of your crop. You can also put your scouting days on the cropping calendar, so the team knows when to walk the field.

Catch it early this season

anee.io keeps your scouting, spraying and harvest on one calendar, and Anee answers when something looks wrong.

  • Scouting days dated from each lot's own planting day
  • Photos and notes for every lot
  • Anee, the smart farm technician, in Tagalog or English
Start free

Questions Farmers Ask About Leafminer

Can plants recover from leafminer?
Mined leaves do not heal, but a plant with a light attack keeps growing. Remove the worst leaves, protect the new growth and keep the natural enemies alive.
Why does leafminer come back after I spray?
Broad spectrum sprays kill the parasitic wasps that keep the flies down, while the larvae inside the leaf escape. An onion study found more parasitism where farmers sprayed less.
Which vegetables do leafminers attack?
Many, including beans, tomato, cucumber, melon, onion, lettuce, carrot and potato. It is one of the pests listed in the crop pests guide.

Stop Leafminer from costing you the harvest

With Libre + Anee, read the whole guide: how to be sure it is this pest, when it pays to act, and what to spray, by active ingredient.

The account is free, no credit card.