If you've got smokers in the household, collect their cigarette butts in water and use the liquid to spray plants. It's the nicotine content of the butts that leeches into the water and kills them.
If you want a greener way of deterring black and greenfly, plant nicotiana / tobacco plants amongst the borders or pots.