This is only done if the cancer has not extended outside the prostate and into the pelvis or abdomen. This type of surgery is known as a prostatectomy.