Fruit fly

Page last updated: Wednesday, 30 May 2018 - 1:07pm

Please note: This content may be out of date and is currently under review.

Mediterranean fruit fly (Ceratitis capitata) is a serious horticultural pest in Western Australia. It attacks a range of cultivated fruits and some fruiting vegetables.

Medfly, as it is commonly known, has been recorded to infest more than 200 hosts worldwide. The first sign of damage is often larvae-infested or ‘stung’ fruit. Stinging is caused by the female laying eggs into unripened or ripe fruit.


The first sign of damage is often larvae-infested or ‘stung’ fruit. Stinging is caused by the female laying eggs into unripened or ripe fruit. Larvae may develop from the eggs, depending on when they are laid and the fruit type.

For example, stings can occur in apples and peaches when they are unripe, but the eggs do not hatch at this stage. As the fruit ripens the eggs can develop.

Life cycle

Medfly activity depends on temperature. In the South West medfly is active in late spring, summer and autumn. In winter, it can become inactive in cold areas. Medfly can overwinter as adults, eggs and larvae (in fruit), or as pupae in the ground. Adult medflies are active in winter when temperatures exceed 12°C.

As temperatures increase in spring, adults begin to emerge from the ground and overwintering flies become active. If control is not started at this time, medfly populations will increase to cause problems later in the season.

Adult stage

The adult fly is 3–5mm long. Its body is light brown and the abdomen is encircled by two light-coloured rings. The thorax (middle) has irregular patches of black and silver, giving it a mosaic appearance. The wings are mottled with distinct brown bands extending to the wing tips.

Don't confuse Medfly for Queensland fruit fly (Qfly), which is larger and reddish brown and has clear wings. Refer to the Qfly web pages for more identifying information. 

The Medfly female has an ovipositor or egg-laying organ but the male does not. Adult Medflies may live for two to three months and are often found in fruit tree foliage, especially citrus trees. As long as fruit is present most Medflies do not move more than 50 metres. However, they will travel further if no hosts are present.


Medflies prefer to lay eggs in soft-fleshed fruit such as apricots, peaches, plums and nectarines. When Medfly numbers are high and competition is greater, females become less choosy and will infest less preferred hosts such as olives.

They will also infest such fruits or vegetables if preferred hosts are not available, even when their populations are low.

Once a suitable host is found, the ovipositor is used to pierce the fruit skin. Batches of up to 300 white banana-shaped eggs are laid into this hole. Eggs are just visible to the naked eye and take 2–4 days to hatch in summer and 19–20 days in winter.

The eggs and larvae of Qfly and Medfly are almost identical, and larval identification needs to be carried out by an expert.

Larvae (maggots)

The larvae are white with a flat, pointed head. This stage of the life cycle is when they are most likely to be seen. When the larvae first hatch they are about 1mm long, but grow quickly to 8mm. The larvae feed on the fruit, causing it to decompose.

When fully grown, larvae stop feeding and jump out from the fruit, burrowing into the soil to pupate. The larval stage takes about 14–16 days in summer and 25–45 days in winter.


Pupae resemble small brown capsules or barrels about 4mm long. Within the pupal case the medfly slowly develops into an adult. When mature the adult fly cuts through the case and burrows up through the soil. The pupal stage lasts 12–14 days in summer and 25–50 days in winter.

Managing Medfly

Fruit trees such as stone fruit (apricots, cherries, peaches, plums, nectarines) can be difficult to grow free of fruit fly in areas like Perth where Medfly populations are high.

Backyard fruit can be a significant source of Medfly to commercial orchards where they occur close to each other. If you are unable to manage Medfly or do not want to harvest your fruit, consider removing unwanted trees.

Managing Medfly in the backyard video



Medfly is a declared pest under the Biosecurity and Agriculture Management Act 2007.  It is mandatory to control this pest in some local government areas of Western Australia Armadale, Kalamunda, Mundaring, Serpentine-Jarrahdale and Swan.

For control to be effective, it is essential for growers (both commercial and home garden) to dispose of fly-infested or unwanted fruit, including fruit left on the tree. Fruit disposal is the responsibility of the grower. Infested fruit should be picked and all fallen fruit gathered from the ground.

Treatment or destruction methods include:

  • boiling and then feeding cooked fruit to poultry or pigs
  • solarising by placing fruit in plastic bags, preferably black rubbish bags so that the heat from the sun kills the eggs and larvae
  • freezing for at least 24 hours
  • mulching to a pulp consistency
  • spraying with a registered insecticide
  • placing in waterin a container with a film of kerosene or oil for at least seven days
  • burial to a depth of at least 1 metre.

Chemical control

Two chemical control techniques, baiting, and lure and kill, are recommended. Best control is achieved if both treatments are undertaken.


You should start during the early stage of fruit development when the fruit is a third of its final size and continue until all fruit has been harvested.

Females require a source of protein to mature their eggs and to maintain egg production. They usually obtain protein from fruit juice, bacteria and bird droppings. Baiting consists of applying coarse droplets of a protein liquid, laced with insecticide, to leaves. Male and female medflies are attracted to the protein as they forage for food, feed on it, and acquire a lethal dose of insecticide. Baiting targets only medfly adults and conserves beneficial insects.

Baiting may not provide control of Medfly in crops that are highly susceptible, or in high pressure areas such as in suburbs with many established fruit trees.

Female Medflies may find ripening stone fruit more attractive than baits. Effectiveness is increased if applied over a wide area such as in a community baiting scheme – so encourage your neighbours to also bait their trees.

The organophosphate maldison is registered for use in baits or for spot spraying of foliage but fruit cannot be picked for four days after spraying. The biologically-derived insecticide spinosad can also be used for baits and spot spraying of the foliage and fruits can be picked on the same day as spraying.

The bait is applied to the foliage as a coarse spot spray of 60–100mm for each tree depending on size. Entire tree coverage is not necessary as the flies are attracted to the protein by smell. The bait can be applied with a garden pressure sprayer, hand-held spray bottle, or flung onto foliage from a bucket with a paint brush. Make sure that the droplets are large — at least 2mm across.

As the insecticides used in baits have a short residual life, baits needs to be re-applied at weekly intervals. They also need to be re-applied if there is more than 5mm of rain.

Baiting requires care and commonsense precautions. As with any pesticide, precautions should be taken particularly when transporting and handling the insecticide concentrate, and mixing and applying bait material.

Lure and kill traps

Lure and kill devices work in a similar way to baits, exploiting the need for female Medflies to obtain dietary protein for egg production. Traps are hung on trees and the protein in the trap attracts male and female flies. Depending on the design, the flies drown or obtain a lethal dose of insecticide.

Nurseries sell a lure and kill device which consists of a plastic container containing a liquid that is attractive to Medflies. The flies enter through small holes in the lid, and eventually drown in the liquid. Freshly-killed flies float on the surface.

You can also make your own traps out of empty soft drink or water bottles, or 2 litre milk or juice cartons. Remove the label first as it may deter flies or attract young children. Drill, punch or burn at least four holes on opposite sides of the bottle, near the ‘shoulders’. The size of the holes should be 6-8mm. The trap can be hung from its neck by wire or string to a branch. Fill one-third of the trap with your recipe.

Many fruit fly trap recipes are available on the web or use the suggestions below.

Homemade or commercial devices should be hung 1.5-2m above the ground in fruit trees. These do not need to be fruiting at the time. Try to place the device in the shady part of the tree. Some traps can also be placed in nearby non-fruiting trees where flies may shelter.

The attractiveness of food lures extends just a few metres, so traps should ideally be no more than 5–6m apart. You should hang at least two homemade traps per tree.

Traps may dry out during summer and should be topped up with more liquid. The entire contents of homemade traps should be replaced at least weekly, as the trap contents will attract other insects besides medfly. However, a commercial lure is likely to attract medfly only. If a trap dries out, medflies may still be attracted, but will not be killed. When disposing of the trap contents, make sure that you do so away from fruit trees as the liquid may attract medflies.

Lure and kill devices are not likely to kill all flies present, as the ripening fruit may be more attractive to the female medfly than the trap contents.

Lure and kill devices can be used in conjunction with baiting or physical exclusion, which could involve fly-proof bags tied around individual fruits or branches.

Recipes to add to traps

Solution 1

80 grams white sugar
1.5g dry brewer's yeast
920mL water

Solution 2

5mL imitation vanilla essence
20mL household ammonia
1L water

Solution 3

Peel from 6 mandarins or two oranges
50mL household ammonia
1L water

Solution 4

1 teaspoon borax
1tsp sugar
2tsp bran
1L water

A man in a blue shirt holding two home-made traps in front of a tree.
Home-made traps for Medfly can be cheap and effective

Physical exclusion

Whole trees or fruits can be protected by excluding Medfly with mosquito netting, shade-cloth or nylon flyscreen. Large nets will need to be supported by a frame. Frames for nets to enclose whole trees can be made from polyethylene irrigation pipe (5cm in diameter), which does not lose its shape in the sun. The frame is constructed by crossing over and tying together two lengths of pipe over the tree.

Frames can be secured in the ground by slipping the end of poly-pipe over posts such as star pickets embedded in the ground. Covers should only be left in place while fruit is ripening to avoid damage to the tree.

Individual fruits or branches can be protected by making bags or sleeves out of cloth such as gauze curtain material, muslin or mosquito netting. Tie-off bags around the base of the fruit or branch with a twist tie or string. Commercial fruit fly exclusion bags are also available in either waxed paper or cloth.

Mango with Medfly exclusion bags

Final advice

There is no 'silver bullet' to rid fruit trees in home gardens of Medfly which is widespread throughout south-west Western Australia. If all property owners in a neighbourhood work together to control the pest, there is a much better chance of keeping populations down so that everybody can enjoy harvesting unblemished fruit.

The Department of Agriculture and Food, Western Australia (DAFWA) needs your help to detect animal and plant pests, diseases and weeds that could pose a threat to agricultural industries.




Commercial and industry enquiries should be directed to Medfly Compliance; all public enquiries should be directed to PaDIS.

Contact information

Pest and Disease Information Service (PaDIS)
+61 (0)8 9368 3080
Commercial Medfly Enquiries Only