thumb|right|Aglais io'' on ''Urtica'' sp.Caterpillars (larvae) of Lepidoptera species (i.e. of butterflies and moths) are mostly (though not exclusively) herbivores, often oligophagous, i.e. feeding on a narrow variety of plant species (mostly on their leaves, but sometimes on fruit or other parts).
Lepidopteran larvae often require specific species of food plants.[1][2][3] It also makes some of them important pests in agriculture or forestry. The host plants have yet to be determined for some species. There is not always consensus among lepidopterists over the listing of suitable plants.
Adult females normally lay their eggs on or near specific food plants (which often have to be abundant enough). Lepidopteran larvae can often be raised on a variety food plants and commercial mixtures.[4] Closely related Lepidoptera tend to have similar food plant preferences. Many caterpillars sequester the toxins from their food plants and use them as a defense against predators.[5] Though it is common for Lepidoptera to prefer a certain plant genus or family, some species feed on a narrow selection of unrelated taxa. The choice is unrelated to nectar plant preferences of adult Lepidoptera, which are much less strict.