This is a lengthy process but possible to clean grout in an easy way. Put hot water on the grout area. Make a mix of vinegar and water taking 1:1 ratio, spray over the area. Then scrub it with any soft brush on the carpet. There are other process to remove carpet stains with liquids. To maintain the new look of carpet you must clean the carpet in right way. For steam cleaning or wet cleaning you must vacuum the carpet and will get brand new look of your carpet.
There are a lot of variants of how you can clean your carpet. The most important question is about the way. If you want to do it in on your own, just use chemicals. But if you do not want to waste your time, companies can assist you in it. The cleaning process will be done quickly and according to all the standards. And you will enjoy the cleanliness in your flat.