1. A method for optimizing a virtual machine (VM) operating system (OS) template, the method comprising: one or more processors obtaining a list of packages in an existing VM template; the one or more processors obtaining a list of packages required to be included in the existing VM template; the one or more processors determining differences between the list of packages in the existing VM template and the list of packages required to be included in the existing VM template; and the one or more processors updating the existing VM template based on the determined differences between the list of packages in the existing VM template and the list of packages required to be included in the existing VM template.