The process of moving undigested food through the intestines as faeces is known as egestion.
Egestion is required in order to get rid of the substance that has been swallowed.
The undigested portion passes to the rectum and is egested out via the anus, while the digested food is absorbed inside the small intestine, and also the water and minerals are absorbed within the large intestine.