We investigate the origin and loss of captured hydrogen envelopes from protoplanets having masses in a range between ‘ sub-Earth ’ -like bodies of 0.1 M _ { \oplus } and ‘ super-Earths ’ with 5 M _ { \oplus } in the habitable zone at 1 AU of a Sun like G star , assuming that their rocky cores had formed before the nebula gas dissipated . We model the gravitational attraction and accumulation of nebula gas around a planet ’ s core as a function of protoplanetary luminosity during accretion and calculate the resulting surface temperature by solving the hydrostatic structure equations for the protoplanetary nebula . Depending on nebular properties , such as the dust grain depletion factor , planetesimal accretion rates , and resulting luminosities , for planetary bodies of 0.1–1 M _ { \oplus } we obtain hydrogen envelopes with masses between \sim 2.5 \times 10 ^ { 19 } – 1.5 \times 10 ^ { 26 } g. For ‘ super-Earths ’ with masses between 2–5 M _ { \oplus } more massive hydrogen envelopes within the mass range of \sim 7.5 \times 10 ^ { 23 } – 1.5 \times 10 ^ { 28 } g can be captured from the nebula . For studying the escape of these accumulated hydrogen-dominated protoatmospheres , we apply a hydrodynamic upper atmosphere model and calculate the loss rates due to the heating by the high soft-X-ray and extreme ultraviolet ( XUV ) flux of the young Sun/star . The results of our study indicate that under most nebula conditions ‘ sub-Earth ’ and Earth-mass planets can lose their captured hydrogen envelopes by thermal escape during the first \sim 100 Myr after the disk dissipated . However , if a nebula has a low dust depletion factor or low accretion rates resulting in low protoplanetary luminosities , it is possible that even protoplanets with Earth-mass cores may keep their hydrogen envelopes during their whole lifetime . In contrast to lower mass protoplanets , more massive ‘ super-Earths ’ that can accumulate a huge amount of nebula gas , lose only tiny fractions of their primordial hydrogen envelopes . Our results agree with the fact that Venus , Earth , and Mars are not surrounded by dense hydrogen envelopes , as well as with the recent discoveries of low density ‘ super-Earths ’ that most likely could not get rid of their dense protoatmospheres .