Many castles have been renovated and restored, some of them to a state close to one period of the past, others with a new style, etc. In France, a whole lot of monuments were restored during the 19th century mainly.
For example the castle of the Dukes of Brittany in Nantes, was renovated in the mid 19th century to remove the modern additions and get it back to its supposed 16th century state (the period when it was actually used by the Dukes of Brittany).
The castle of Belle-Île was also restored, in the 20th century, to its 18th century state, this one entirely through private funds.
Another castle I know well is the Suscinio castle, which was a complete ruin and was restored in the second half of the 20th century, but not to its former state.
And for another restoration effort with yet another kind of result, het Gravensteen in Ghent was restored in the 19th to its supposed 12th century state, but they got it mostly wrong. That's what happened with most restoration efforts during this period, as far as I know.
Today, the most common stance is often to preserve ruins as they are, keep them from degrading further and do the least work possible on them because we are well aware of all the botched restoration efforts of the past.