# Prepupa

The prepupa is a stage in the life cycle of certain insects, following the larva or nymph and preceding the pupa. It occurs in both holometabolous and hemimetabolous insects.

## Examples
### Coleoptera

Lady beetles have a prepupa stage. In Coleomegilla maculata, this lasts up to 24 hours. A larva enters the stage by attaching its rear abdominal segments to a leaf, and its body becomes stiff and curved. It does not move unless provoked (e.g. by a predator attacking it), in which case it moves to escape the threat.
In the stag beetle Cyclommatus metallifer, the prepupa involves four distinct stages. The first lasts 2 days and involves a beetle larva constructing its pupal cell. The second lasts 3-4 days and involves the prepupa purging the contents of its gut, also changing shape in the process. The third stage, in which the prepupa undergoes proliferation of adult tissues, lasts 3-5 days. 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.

### Diptera

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. It usually responds to disturbance by ceasing movement (tonic immobility), a response rarely done by larvae. Prepupae do not feed and migrate towards shelters where they then pupate.
Flies of superfamily Hippoboscoidea are unusual in that a larva develops inside its mother and is born in the prepupa stage, whereupon it immediately progresses to the pupa stage.

### Hemiptera

In males of most scale insects and mealybugs (Coccoidea), there are two nymphal instars, followed by a prepupal instar and a pupal instar, and finally the adult stage. The prepupa and pupa are usually protected by some kind of covering secreted by the previous stage. The prepupa of some of the primitive archaeococcoids is similar to the nymph aside from lacking functional mouthparts and sometimes having reduced legs. Other archaeococcoids have prepupae with developing wing pads and legs. In the more derived neococcoids, there are signs of legs and sometimes developing wing pads. Some mealybugs have prepupae (and pupae) capable of movement.

### Hymenoptera

Various Hymenoptera overwinter in the prepupa stage. These typically become prepupa in mid- or late summer, then go into diapause for autumn and winter, resuming development in spring or early summer.
In honeybees, a larva about to become a prepupa first orients its anterior end towards the cap of its cell. It spins a cocoon around itself and progresses to the prepupa stage. The honeybee prepupa is straightened and motionless in its cell, during which its cuticle progressively loosens. Finally, it undergoes ecdysis to become a pupa.
Sawfly prepupae are often entirely white or bone-coloured. The mandibles are shaped differently to larval mandibles. As with prepupae of other groups, they stop feeding and become sluggish.

### Lepidoptera

The prepupa stage is rare in Lepidoptera, with most species passing directly from the feeding larva stage to the pupa stage. An exception to this is Calindoea trifascialis. Other exceptions include species of Papilio.

### Megaloptera

Alderflies and dobsonflies (Megaloptera) are aquatic as larvae, but their prepupae leave the water to find pupation sites. A larva may travel 10 m or more away from water. It finds a rock, log or human debris and digs a shallow chamber underneath.

### Thysanoptera

Thrips have two feeding instars (called larvae or nymphs), followed by the nonfeeding prepupa and pupa. The prepupa and pupa often occur in soil or leaf litter, or in plant crevices or galls.

## Importance to humans

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. Their prepupae can be "self-harvested" by exploiting their migration instinct to make them go into a collection area.
Prepupae, along with pupae, of eri silkworm (Samia ricini) are consumed as food in India.