1. A method for generating an update package based on a comparison between a base data image and a new data image, the update package including a set of instructions used for, in a remote client device, creating the new data image from the base data image, the method comprising: determining differences between the base data image and the new data image; generating COPY instructions corresponding to respective sections of code in the base data image that can be used in creating the new data image by copying the respective sections of code into new data locations in the new data image; organizing the COPY instructions into a directed acyclic graph; performing cycle detection on the COPY instructions in the directed acyclic graph to detect any cycles; when a cycle is detected, identifying a COPY instruction in the detected cycle with a smallest overlapping part, removing the overlapping part from the identified COPY instruction, and generating a COPYBACK instruction including the overlapping part removed from the identified COPY instruction; and after all cycles have been detected, generating the update package based on the COPY and COPYBACK instructions.