Waste pipes are subjected to a lot of corrosive materials such as rust, lime and calcium. The lime and calcium collect on the pipe from exposure to water that has a high mineral content. The combination of water and the oxygen in the air results in rust that will eat away at the pipe over time. A ruptured waste pipe is a messy and potentially expensive proposition, so removing the rust and mineral build-up regularly from the pipes will help prevent it from occurring.
Pour undiluted white vinegar onto a cloth so that the cloth is soaked. The acidity of vinegar is very useful in removing rust and mineral deposits from pipes.
Wrap the cloth around the waste pipe and rub at it thoroughly to get the entire pipe as wet with vinegar as possible.
Sprinkle salt over the pipe. The vinegar will help much of the salt to stick to the waste pipe. Salt also helps break down the chemical bonds between the rust, lime, calcium and metal.
Apply a damp scrubbing pad to the pipe and scrub the pipe to grind away at the minerals and rust. This will likely require a lot of effort since rust and calcium do not wipe away easily. Multiple applications of the vinegar may be required; you also can scrape the pipe with a butter knife to remove stubborn deposits. Scratching the waste pipe shouldn't be a concern, so you can use as much force as you need.
Wear rubber gloves and apply a commercial acidic cleaner to the pipe using the scouring pad if stains persist. Follow all instructions on the container to prevent injury, since the acids in the commercial cleaners are stronger than the vinegar and can burn skin if exposure occurs. Many cleaners require you to mix them with water before application.
To clean out the inside of the pipe, turn the water off and remove the pipe. Use the same materials and scrub the inside of the pipe out with a metal pipe-cleaning brush.