Unless it’s extremely worn, you may be able to avoid replacing carpet. Buyers often prefer to choose their own new carpet or opt for hardwood floors.
Get Rid of Carpet Stains, Cleaning Carpet, Patching Carpet