The old plumbing pipes most worth replacing are the ones that carry your drinking water: polybutylene, galvanized steel and any lead line. Old sewer pipe is a different decision. Cast iron and clay can often be lined from the inside once a camera shows their condition, while Orangeburg usually has to come out.
Polybutylene is gray, flexible plastic supply pipe, often joined with metal crimp rings. It weakens from the inside, so a clean outside proves little. Galvanized steel has threaded joints and a magnet sticks to it; it rusts inside, narrowing flow and browning the water. Lead is most likely in homes built before 1986, according to the EPA. Scratched gently with a key it shows shiny silver, and a magnet will not stick.
The drain side ages differently. Cast iron corrodes along the bottom of the pipe, and there is a window when it can still be relined; here is how to identify cast iron plumbing. Clay usually fails at the joints, where roots get in. Both are candidates for lining as long as the pipe still holds its shape, which is the test explained in whether any sewer pipe can be lined.
Orangeburg is the exception. It is a fiber pipe that tends to flatten into an oval, which leaves nothing round for a liner to press against, so Orangeburg is rarely lined and is normally replaced.
Age alone is not a reason to rip anything out. The magnet and scratch checks are only a screen, exposed pipe in a garage may not match what is buried, and the EPA notes that only a water test confirms lead. A sewer line’s condition is known only after a camera has been through it.