A thoracotomy is a surgical procedure that opens the chest cavity by making an incision through the chest wall. This is a more extensive procedure than a thoracostomy and is used for lung surgery, to look more closely at the lungs, and to remove a lung or part of a lung. In rare cases a thoracotomy may also be used to treat pneumothoraces.