We formulate a noncommutative generalization of the Ricci flow theory in the framework of spectral action approach to noncommutative geometry. Grisha Perelman's functionals are generated as commutative versions of certain spectral functionals defined by nonholonomic Dirac operators and corresponding spectral triples. We derive the formulas for spectral averaged energy and entropy functionals and state the conditions when such values describe (non)holonomic Riemannian configurations.