Are you getting ready to sell your home with new carpet and old baseboards, bad idea. If your carpet needs replaced and you believe it will allow you to get more money for your home (more than the cost of the carpet) than move forward with your decision. However, "a tip", don't forget the baseboards, if you think the baseboards looked bad with the old carpet wait until you see the baseboards with the new carpet.
Sometimes all that is required is for the baseboards to be thoroughly cleaned. You know how it works; get a good cleaning agent, a couple of rags (one wet and one dry) and a green fiber scrub pad, and spend $10.00 for a cheap pair of knee pads because you will need to get down on your knees and scrub away. Hint, clean the baseboards before you have the new carpet installed, then you don't have to worry about being sloppy. I have seen it time and time again where the home seller thinks they won't have to clean the baseboards and then when the new carpet is installed, Guess What? You are right, the baseboards need cleaned and now they will have to cover the carpet with plastic in order not to spill any cleaning agent. That folks is called, "creating busy work", and that can reduce the time allocated for watching sporting events on the big screen TV.
If the baseboards need replaced then do so, if you don't, it is the same as buying a new pair of shoes and putting in old shoe laces, and that is real attractive! The same applies to painting, make sure to paint the baseboards before installing the new carpet (not after the installation, I think we know why), and when you choose your paint color, more often than naught the color will be a shade of white and please use Semi-Gloss. Flat white paint baseboards placed next to new carpet looks like a "weekend project gone bad".
I assure you, new carpet with sparkling baseboards will make you look very smart when selling your home and it just might get you some more money and that is good. I sure hope all of the efforting I put into keeping the baseboards clean at my home has my wife thinking I am "very smart", what do you think?