Pry up the broken carpet gripper with a pry bar. Place the pry bar at each nail into the subfloor and pull up on the gripper.
Measure and cut a new carpet gripper using a tape measure and saw.
Install the new carpet gripper by hammering nails into the subfloor at the specified intervals.
Pull back the carpet carefully where you think the carpet gripper has a problem. When you find it, loosen the entire carpet edge along the wall.
Measure and cut a new carpet gripper using a tape measure and saw.
Install the new carpet gripper by hammering nails into the subfloor at the specified intervals.
Replace the carpet over the new gripper. Use a knee kicker to stretch and attach the carpet onto the new gripper.