An algebra is said to be hopfian if it is not isomorphic to a proper quotient of itself. We describe several classes of hopfian and of non-hopfian unital lattice-ordered abelian groups and MV-algebras. Using Elliott classification and $K_0$-theory, we apply our results to other related structures, notably the Farey-Stern-Brocot AF C$^*$-algebra and all its primitive quotients, including the Behnke-Leptin C$^*$-algebras $mathcal A_{k,q}$.