I had a gas heater removed. When the unit was removed the gas pipe that fueled the heater was capped.
Before I seal the space in the wall where the capped gas pipe is located, I need to know what the possibility is of gas escaping someday from the capped joint.
Many times old gas lines are capped and the walls closed with out any problems.
I am against this practice as someone may one day accidentally put a drywall screw or nail in the line or it may just rust out and be a potential leak.
If you can find the shut off valve I would suggest you close it cut the pipe on the outlet side and then place a plug with leak block or other approved joint compoun in the valve discharge side and test the valve for possible leaks.
This way you know for sure the piping is dead