Caterpillars can survive in a large jar or cage equipped with a small food plant and twigs. Caterpillars eat only specific plants depending on their species, requiring more food as they grow larger. For hydration, caterpillars need their cages lightly sprayed with water once a day.
Before putting new food plants or leaves in a caterpillar's cage, always wash and dry the plant carefully. Always feed a caterpillar fresh plants, adding in a fresher source when the leaves start to wilt. A food plant can also be kept in the cage in a small glass of water, though the water should be blocked with cotton wool to ensure that the caterpillar does not fall in and drown. In the likely event that a caterpillar falls off its plant, it uses twigs to climb back onto its food source.
The cage can be kept outside if the caterpillar is not a tropical species, but it must be adequately protected from the elements. Caterpillars can be kept in cages together, but if there is not enough food for them, the normally herbivorous insect turns cannibalistic to survive. Different species of caterpillars require various environments to pupate in and hatch within a few weeks. Keep its environment humid and moist. Once the butterfly or moth emerges, it needs twigs to crawl onto to allow its wings to dry properly.