  We study the co-evolution of Yang-Mills fields and perfect fluids in Bianchi
type I universes. We investigate numerically the evolution of the universe and
the Yang-Mills fields during the radiation and dust eras of a universe that is
almost isotropic. The Yang-Mills field undergoes small amplitude chaotic
oscillations, which are also displayed by the expansion scale factors of the
universe. The results of the numerical simulations are interpreted analytically
and compared with past studies of the cosmological evolution of magnetic fields
in radiation and dust universes. We find that, whereas magnetic universes are
strongly constrained by the microwave background anisotropy, Yang-Mills
universes are principally constrained by primordial nucleosynthesis and the
bound is comparatively weak, and Omega_YM < 0.105 Omega_rad.
