Larvae live in sap trails, under bark, in rot-holes in trees and in decaying organic material such as dung and compost. Most larvae feed on decaying organic debris. They are filter feeders in many kinds of aquatic media. They purify water by filtering microorganisms and other products. Some feed on bulbs and are considered garden pests.