The molecular structure, vibrational frequencies, infrared intensities and electric dipole moments of ytterbium dihalides YbX2 (X = F, Cl, Br, I) in their ground electronic state are studied at the coupled-cluster singles, doubles and perturbative triples CCSD(T) level using a series of large all-electron basis sets together with the complete basis set (CBS) extrapolation procedure, and with both scalar-relativistic and spin–orbit coupling effects taken into account. Excitation energies of low-lying electronic states are calculated at the multireference configuration interaction, equation-of-motion CCSD and single-reference CCSD(T) levels of theory. For all of the molecules under study, the CCSD(T)/CBS equilibrium geometries are found to be non-linear (C2v symmetry). There is a rapid decrease in heights of the barriers to linearity on passing through the YbX2 molecular series from fluoride to iodide: 1587 → 261 → 110 → 7 (all in cm−1) for YbF2 → YbCl2 → YbBr2 → YbI2, respectively. The uncertainties in the molecular structure data published to date are discussed and resolved in the light of the present results.