No, they are not a write off. Any capital improvements will be added to the original purchase price which will reduce gain on the sale. The expense for the main cast iron drain would be considered a capital improvement.
Keep track of these cost as long as you own the home. Any maintenance cost are not deductible such as insurance, repairs, lawn care, utilities, etc.