I'm remodelling my bathroom. The tub needs to be pushed back about 2in against the wall but an old pipe is in the way. I think it is no longer being used. But it's placement is confusing me. The pipe comes up from the basement drain lines. It goes straight up to the ceiling in the bathroom. In the bathroom the pipe branches to the wall behind the sink area but the pipe is caped off. A new pvc pipe drain has been put in to the floor for the sink. The confusing part is the pipe runs up into the ceiling and then disappears. There is no bathroom upstairs. And I can't imagine there has ever been a bathroom upstairs. So why would the pipe run up to the second floor. Also what can I do to move this pipe back a few inches? Can I cut the pipe and attach a softer flexible pipe at the point where l need it to go behind the edge of the tub? I'm scared to just cut the pipe out because I don't know what it's leading to upstairs.
It's most probably a drain vent pipe. Go look at the roof directly above where this pipe is. If you see something like the picture then it is a vent pipe. If so you can reroute this vent with a section of PVC. Here is a link on how to connect PVC to galvanized: PVC to galvanized The detours should be angled up at least 45°. If you do cut out a section of this pipe make sure that you support the upper section adequately, with braces to the studs, so that it does not drop down due to its own weight.