Let me ask you a couple of questions first:
Is your carpet stained?
Is your carpet old and worn out in places?
Is your carpet super old fashioned, shagpile or some weird obscure colour?
Do you want to attract a lot of potentional buyers and end up getting the most money you can for your home?
If your answer is yes, yes, yes and yes then go ahead and replace the carpeting. You don't have to spend a fortune, just something neutral. Perhaps if the carpet is just dirty and deep professional clean may do the job but at the end of the day you want every inch of your home to gleam and show at its very best. The aim is to have every potential buyer come and see your house and be able to visualise themselves living there immediately. You do not want them put off by dirty gross carpeting and the same goes really for any flooring that you have in your home.