A celebrated result due to Poincaré affirms that a closed non-degenerate minimizing geodesic γ on an oriented Riemannian surface is hyperbolic. Starting from this classical theorem, our first main result is a general instability criterion for timelike and spacelike closed semi-Riemannian geodesics on both oriented and non-oriented manifolds. A key role is played by the spectral index, a new topological invariant that we define through the spectral flow (being the Morse index truly infinite) of a path of selfadjoint Fredholm operators. A major step in the proof of this result is a new spectral flow formula.Bott's iteration formula, introduced in [Bot56], relates in a clear way the Morse index of an iterated closed Riemannian geodesic and the so-called ω-Morse indices. Our second result is a semi-Riemannian generalization of the famous Bott-type iteration formula in the case of closed (resp. timelike closed) Riemannian (resp. Lorentzian) geodesics.Our last result is a strong instability result obtained by controlling the Morse index of the geodesic and of all of its iterations.