Solid wastes leave the body through the rectum, as described in the section on the digestive system. The lungs are also a part of the excretory system. They get rid of the carbon dioxide that our bodies don't need. This happens when we breathe out, as is described in the section on the respiratory system.