It seems that there is special cleanser to clean carpet.
It depends on the materials of your carpet. Small is no peoblem. If the carpet is too large, then you have no way to clean by yourself. use shampoo, don't try to clean antique carpets on your own, the other is no problem,