Removes patch,tree and vi