Prince Andrew has confirmed he will relinquish all of his royal titles including Duke of York.