We demonstrate rotational and vibrational cooling of cesium dimers by optical pumping techniques. We use two laser sources exciting all the populated rovibrational states, except a target state that thus behaves like a dark state where molecules pile up thanks to absorption-spontaneous emission cycles. We are able to accumulate photoassociated cold Cs2 molecules in their absolute ground state (v = 0, J = 0) with up to 40% efficiency. Given its simplicity, the method could be extended to other molecules and molecular beams. It also opens up general perspectives in laser cooling the external degrees of freedom of molecules.