The phonon spectra of thin freestanding, hydrogen passivated, Ge nanowires are calculated by ab initio techniques. The effect of confinement on the phonon modes as caused by the small diameters of the wires is investigated. Confinement causes a hardening of the optical modes and a softening of the longitudinal acoustic modes. The stability of the nanowires, undoped or doped with B or P atoms, is investigated using the obtained phonon spectra. All considered wires were stable, except for highly doped, very thin nanowires.