  We investigate the origin and loss of captured hydrogen envelopes from
protoplanets between `sub-Earth'-like bodies of 0.1$M_{\oplus}$ up to
`super-Earths' with 5$M_{\oplus}$ in the HZ of a Sun like G star, assuming
their rocky cores had formed before the nebula dissipated. We model the
gravitational accumulation of nebula gas around a 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 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}$ hydrogen envelopes
within the mass range of $\sim 7.5\times 10^{23}$--$1.5\times 10^{28}$ g can be
captured. To study the escape of these hydrogen-dominated protoatmospheres, we
apply a hydrodynamic upper atmosphere model and calculate the loss rates due to
the heating by the high XUV flux of the young star. Our results indicate that
under most nebula conditions `sub-Earth' and Earth-mass planets can lose their
envelopes by thermal escape during the first $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,
`super-Earths' accumulate a huge amount of nebula gas and lose only tiny
fractions of their primordial 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 protoatmospheres.
