The process of excreting unusable or undigested material through the anus is known as:
egestion
The processes taking place in the digestive system in order from start to finish are ingestion, digestion, absorption and egestion.
Ingestion is the consumption of food by an organism. Digestion is the process of breaking down food by mechanical and enzymatic action in the alimentary canal into substances that can be used by the body. Absorption is the process by which the digested food molecules are absorbed in the small intestine. Lastly, the leftover or undigested food is removed from the body through anus by the process of egestion.