We describe mechanisms for automated evolution of ontologies to adapt to new circumstances and to make them better suited to the given task. If a conflict is detected between the original theory and new experimental evidence, a repair is required to resolve the inconsistency and to recover from failure. The rules for conflict diagnosis and transformation of the ontologies are composed together into ontology repair plans. The repair plans have been implemented in the GALILEO system and successfully evaluated on a diverse range of examples from the history of physics. By applying the described repair plans, the initially incorrect physical theories in our examples are repaired to become consistent with experimental results.