A ripped carpet can be unsightly and pose a safety hazard, but replacing the whole thing may be costly and unnecessary.