Control options for backyards

Page last updated: Wednesday, 15 February 2023 - 10:12am

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


Backyard fruit can be a significant source of Mediterranean fruit fly (Medfly). If you are unable to manage Medfly or do not want to harvest your fruit, consider removing unwanted trees. 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. 

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, feed on it, and ingest a lethal dose of insecticide. Baiting targets only adult Medflies 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, 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 either 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, 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. While 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 can 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

Home-made traps for Medfly can be cheap and effective

Department of Agriculture and Food senior technical officer Ernie Steiner holds home-made fruit fly traps.

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 that 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.

Medfly control weapons in the backyard include bagging fruit to prevent females from stinging them.

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.


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