We compute the thermal conductivity of the most common polymorphs of titanium dioxide (TiO2), rutile and anatase, using a first-principles approach and solving the phonon Boltzmann transport equation beyond the relaxation time approximation. We find that both polytypes are anisotropic, as expected from their crystal structure; however, while κxx = κyy < κzz for rutile, the opposite holds for anatase. The modal decomposition of the thermal conductivity provides insight in this inversion in the anisotropy of the two polytypes.