Systems need to be updated to last for a long time in a dynamic environment, and to cope with changing requirements. The update can be performed both statically, by restarting the system, or dynamically. In both the cases, it is important for updates to preserve the desirable properties of the system under update, while possibly enforcing new ones.Here we consider a simple yet general update mechanism, which replaces a component of the system with a new one. The context, i.e., the rest of the system, remains unchanged. We dene contexts and components as Constraint Automata interacting via either asynchronous or synchronous communication, and we express properties using Constraint Automata too. Then we build most general updates which preserve specic properties, considering both a single property and all the properties satised by the original system, in a given context or in all possible contexts. In order to apply our approach also to dynamic update, we consider the state transfer problem, namely how to nd the state in which the new component should be started to ensure that the overall behaviour is correct.