Gastrectomies are performed to treat cancer and perforations of the stomach wall. A gastrectomy is a medical procedure that involves surgically removing the stomach. There are two main types of gastrectomy; a partial gastrectomy - where only part of the stomach is removed, and a total gastrectomy - where all of the stomach is removed.