To replace a sewer line, cut off the water supply along the line, expose and remove the old sewer line, fit in the new line, and install the vertical pipes in the wyes. Seal the fitted portion and test it out to check for leaks. Fill the trench, tamping each layer of dirt with a gas-powered tamper or by stomping on it.
Get a permit to replace the sewer line, and find out the exact location and depth of the line before starting on the job. Dig around the sewer line to expose the entire line, starting nearest to the house and working towards the street. Wrap the soil pipe cutter's chain around the old sewer line and cut the pipe carefully. Check what fittings are needed to replace the sewer line and measure how much replacement pipe is needed apart from the adapters, plugs and wyes.
Make sufficient place in the trench to install the new sewer line and install a coupling on the pipe coming out from the house. Remove any burs, and install the new pipe into the coupling, fitting a wye with the bend facing upward to prevent any water backups. Install the couplings and the adapters to direct flow, and keep the pipe in place. If the pipe is longer than 10 feet, replace it in lengths with primer, cement and fittings every 10 feet to keep it together. Test out the new sewer line, and get an inspector to check the new installation.