If you retire and remove a depreciable asset in connection with the
installation or production of a replacement asset, you can deduct the
costs of removing the retired asset. However, if you replace a
component (part) of a depreciable asset, capitalize the removal costs
if the replacement is an improvement and deduct the costs if the
replacement is a repair.