Dan Edward Phillips, Realtor and Broker/Owner serves Humboldt and Del Norte Counties wrote this short post that really resonated with me. My family lost a house to fire when I was young (not from this cause) and the family pet died in the fire.
Your life and the lives of your family members could well depend on proper capping/sealing of unused appliance gas lines. When you discontinue service, have the line professionally sealed.
If you are considering an appliance replacement or have recently changed an appliance that involves changing from a gas appliance (range, cloths dryer etc.) to an electric one. Use caution in how the gas supply line is sealed.
Just turning off the gas shut off valve is not enough. The gas supply line should, for your safety, be capped as well as having the gas shut off valve turned off.
The gas shut off valve can be turned on by mistake and in some cases a falling or moving object could turn it back on. In addition an old gas shut off valve that has been left in the "on" position for many years could be defective.
When changing appliances out and an old gas line will not be used in the future, have the line capped by a professional. The small cost is worth it!