They do this by an arrangement where the malpighian tubules are wrapped around the rectum. In some insects the Malpighian tubules may have other uses. In insects living in fresh water of very salty water have other problems in regulating their osmotic balance. Insect living in very dry environments use metabolic water to meet part or all of their water requirements. Insect in this condition which need water will eat great quantities of food in order to metabolize the water from it.
Insects also obtain water by drinking, and some have the capacity to absorb water from humid air.
This seems to be an active process requiring the expenditure of energy as the inside of the insect is of a higher humidity than the outside. Respiration Gas exchange is carried out through the tracheal system. The air enters the body though holes called spiracles. The tracheal system consists of a set of branching tubes and air sacs which extend through the body. The finest portions of the tubes extend with a fell cell diameters of all parts of the body.