If $\mathcal{M}$ is complete, locally irreducible and non-locally symmetric then its restricted holonomy group must be in the Berger list. The restricted holonomy group is the subgroup of the full holonomy group generated by null-homotopic loops, and is the identity component.
The above is a 'topology free' formulation, because it makes sense using only information in any neighbourhood of a point (good enough for calculus). If you want a global statement then the fundamental group of the manifold needs to be considered. The full holonomy group can have several components (the fundamental group surjects onto the component group) and the holonomy list will be different for each manifold, depending on its fundamental group. To avoid this, a common assumption is that your space is simply-connected. This means that the full holonomy group is the same as the restricted one. It also means that you only have to demand that your manifold be irreducible and non-symmetric, without the word 'locally'. It's a matter of taste/application whether you use the 'local' or 'simply-connected global' wording of the Berger-Simons Theorem.
The manifold must not be locally symmetric because in that instance, holonomy groups can occur that aren't on the list. There is a lot more to be said on this topic and it certainly won't fit into a single answer here, so I recommend three well-established and excellent books: Kobayashi-Nomizu 'Foundations of Differential Geometry Vol I', Besse 'Einstein Manifolds', and Salamon 'Riemannian Geometry and Holonomy Groups'.