The question of how to teach energy has been renewed by recent studies focusing on the learning and teaching progressions for this concept. In this context, one question has been, for the most part, overlooked: how should energy be defined throughout schooling. This paper addresses this question in three steps. We first identify and discuss two main approaches in physics concerning the definition of energy, one claiming there is no satisfactory definition and taking conservation as a fundamental property, the other based on Rankine's definition of energy as the capacity of a system to produce changes. We then present a study concerning how energy is actually defined throughout schooling in the case of France by analyzing the national programs, physics textbooks, and the answers of teachers to a questionnaire. This study brings to light a consistency problem in the way energy is defined across school years: in primary school, an adapted version of Rankine's definition is introduced and conservation is ignored; while in high school, conservation is introduced and Rankine's definition is ignored. Finally, we address this consistency problem by discussing possible teaching progressions. We argue in favor of the use of Rankine's definition throughout schooling: at primary school, it is a possible substitute to students' erroneous conceptions; at secondary school, it might help students become aware of the unifying role of energy and thereby overcome the compartmentalization problem.