A vagotomy is a surgical procedure that involves removing part of the vagus nerve. It is performed in the abdomen.
 A plain vagotomy eliminates the parasympathetic supply from the stomach to the left side of the transverse colon.  Other techniques focus on branches leading from the retroperitoneum to the stomach.
 Highly selective vagotomy refers to denervation of only those branches supplying the lower esophagus and stomach (leaving the nerve of Latarjet in place to ensure the emptying function of the stomach remains intact). It is one of the treatments of peptic ulcer.
 Vagotomy is an essential component of surgical management of peptic (duodenal and gastric) ulcer disease (PUD). Vagotomy was once commonly performed to treat and prevent PUD; however, with the availability of excellent acid secretion control with H2 receptor antagonists, such as cimetidine, ranitidine, and famotidine, and proton pump inhibitors (PPIs), such as pantoprazole, rabeprazole, omeprazole, and lansoprazole, the need for surgical management of peptic ulcer disease has greatly decreased.
 The basic types of vagotomy are:
 All types of vagotomy can be performed at open surgery (laparotomy) or using minimally invasive surgery (laparoscopy).
 For the management of PUD, vagotomy is sometimes combined with antrectomy (removal of the distal half of the stomach) to reduce the rate of recurrence. Reconstruction is performed with gastroduodenostomy (Billroth I) or gastrojejunostomy (Billroth II).  It is left intact in highly selective vagotomy so the function of gastric emptying remains intact.
 Truncal vagotomy is a treatment option for chronic duodenal ulcers. It was once considered the gold standard, but is now usually reserved for patients who have failed the first-line "triple therapy" against Helicobacter pylori infection: two antibiotics (clarithromycin and amoxicillin or metronidazole) and a proton pump inhibitor (e.g., omeprazole). It is also used in the treatment of gastric outlet obstruction.
 In 2007 the use of vagotomy to treat obesity was being studied. The vagus nerve provides efferent nervous signals out from the hunger and satiety centers of the hypothalamus, a region of the brain central to the regulation of food intake and energy expenditure. The circuit begins with an area of the hypothalamus, the arcuate nucleus, that has outputs to the lateral hypothalamus (LH) and ventromedial hypothalamus (VMH), the brain's feeding and satiety centers, respectively. Animals with lesioned VMH will gain weight even in the face of severe restrictions imposed on their food intake, because they no longer provide the signaling needed to turn off energy storage and facilitate energy burning. In humans, the VMH is sometimes injured by ongoing treatment for acute lymphoblastic leukemia or surgery or radiation to treat posterior cranial fossa tumors. With the VMH disabled and no longer responding to peripheral energy balance signals, "[e]fferent sympathetic activity drops, resulting in malaise and reduced energy expenditure, and vagal activity increases, resulting in increased insulin secretion and adipogenesis." "VMH dysfunction promotes excessive caloric intake and decreased caloric expenditure, leading to continuous and unrelenting weight gain. Attempts at caloric restriction or pharmacotherapy with adrenergic or serotonergic agents have previously met with little or only brief success in treating this syndrome." The vagus nerve is thought to be one key mediator of these effects, as lesions lead to chronic elevations in insulin secretion, promoting energy storage in adipocytes.  
Vagotomy may have an impact upon ghrelin. In an open-label, prospective study of 30 obese patients (26 women), response has been variable; the intervention has generally been safe, although adverse events have included gastric dumping syndrome (n=3), wound infection (n=2), other (n=5), and diarrhea (n=6).
 Vagotomy was once popular as a way of treating and preventing PUD and subsequent ulcer perforations. PUD was thought to be due to excess secretion of the acid environment in the stomach, or at least that PUD was made worse by hyperacidity. Vagotomy was a way to reduce the acidity of the stomach, by denervating the parietal cells that produce acid. This was done with the hope that it would treat or prevent peptic ulcers. It also had the effect of reducing or eliminating symptoms of gastroesophageal reflux in those who suffered from it. The incidence of vagotomy decreased following the discovery by Barry Marshall and Robin Warren that H. pylori is responsible for most peptic ulcers, because H. pylori can be treated much less invasively. One potential side effect of vagotomy is a vitamin B12 deficiency. As vagotomy decreases gastric secretion, intrinsic factor production can be impaired. Intrinsic factor is needed to absorb vitamin B12 efficiently from food, and injections or large oral doses of the vitamin may be required after such a procedure in certain populations.