A gastrectomy is a surgical procedure where all or part of the stomach is removed. This surgery may be necessary for various reasons, including stomach cancer, severe peptic ulcers, benign tumors, or severe obesity. The extent of the surgery can range from partial to total removal of the stomach.