  We study locally compact groups having all subgroups minimal. We call such
groups hereditarily minimal. In 1972 Prodanov proved that the infinite
hereditarily minimal compact abelian groups are precisely the groups $\mathbb
Z_p$ of $p$-adic integers. We extend Prodanov's theorem to the non-abelian case
at several levels. For infinite hypercentral (in particular, nilpotent) locally
compact groups we show that the hereditarily minimal ones remain the same as in
the abelian case. On the other hand, we classify completely the locally compact
solvable hereditarily minimal groups, showing that in particular they are
always compact and metabelian.
  The proofs involve the (hereditarily) locally minimal groups, introduced
similarly. In particular, we prove a conjecture by He, Xiao and the first two
authors, showing that the group $\mathbb Q_p\rtimes \mathbb Q_p^*$ is
hereditarily locally minimal, where $\mathbb Q_p^*$ is the multiplicative group
of non-zero $p$-adic numbers acting on the first component by multiplication.
Furthermore, it turns out that the locally compact solvable hereditarily
minimal groups are closely related to this group.
