Starting with Version 1.1.0, attacking planets will only use up the Nanobots that are necessary to destroy the particular planet.