The primary osmoregulatory and excretory organs of insects, known as malpighian tubules (MTs), are compared to the nephridia or kidneys, the homologous organs of annelids, and vertebrates.
Insects' posterior regions have malpighian tubules, which collaborate with glands in the rectum to eliminate waste and maintain osmotic equilibrium.
The malpighian tubules are a cockroach's excretory organ. It is located where the midgut and hindgut meet.
In the hemolymph, they are at ease. It aids in clearing the hemolymph of metabolic waste.