  We construct N-complexes of non completely antisymmetric irreducible tensor
fields on $\mathbb R^D$ generalizing thereby the usual complex (N=2) of
differential forms. These complexes arise naturally in the description of
higher spin gauge fields. Although, for $N\geq 3$, the generalized cohomology
of these N-complexes is non trivial, we prove a generalization of the
Poincar\'e lemma. Several results which appeared in various contexts are shown
to be particular cases of this generalized Poincar\'e lemma.
