A larva enters the stage by attaching its rear abdominal segments to a leaf, and its body becomes stiff and curved.
The second lasts 3-4 days and involves the prepupa purging the contents of its gut, also changing shape in the process.
The fourth and final stage is the shortest at just a few hours, in which the prepupa finishes purging its gut contents and completing its transformation into a pupa.
[2] In black soldier fly (Hermetia illucens), the prepupa differs from the larva by being darker and having reduced mouthparts.
It moves around with a sinusoidal movement of the body, whereas the larva relies more heavily on pinning the substrate with its head.
The prepupa of some of the primitive archaeococcoids is similar to the nymph aside from lacking functional mouthparts and sometimes having reduced legs.
[10][11] Alderflies and dobsonflies (Megaloptera) are aquatic as larvae, but their prepupae leave the water to find pupation sites.
[13][14] Black soldier flies have various uses, being able to consume organic wastes and then be used as food and feed, or in production of bioplastics.