Software in IoT devices needs to be improved regularly to adapt security issues and new user requirements. In advanced IoT networks, devices employ the component-based software architecture in which components can be updated at run-time, such devices can download software components from neighbors, enabling fast distribution of updates in the entire network. One of the most energy consuming operations in the update process is flash re-writing in which the order of re-writing components into the flash memory is decisive for energy consumption. In this paper, we propose a mechanism that schedules updates in an entire IoT network to minimize the energy consumption, while satisfying the deadline constraint for updating all the devices. We mathematically formulate the problem of energy efficient update scheduling as an optimization problem with a novel energy model of the update process, then propose an algorithm to approximate the optimal schedule for updating all devices in the network. We examine the proposed algorithm in three different network instances including a tree, a partial mesh and a full mesh topology. Simulation results illustrate that our algorithm can obtain a near optimum which is, in the best case, only 3.2% different from the minimum.Index Terms-energy efficiency, software update, IoT device, component-based IoT software.