Short answer. You can renounce your part-ownership of the party wall when you demolish, but that does not free you from cost. The law says you must still bear the cost of all repairs and work needed to prevent damage the demolition itself may cause to the wall.
What the law says
If the owner of a building, supported by a party wall desires to demolish the building, he may also renounce his part-ownership of the wall, but the cost of all repairs and work necessary to prevent any damage which the demolition may cause to the party wall, on this occasion only, shall be borne by him.
Civil Code, Article 663 — Renouncing Part-Ownership of the Wall. Read the full provision →
Renouncing ownership does not erase the cost
An owner of a building supported by a party wall who wants to demolish it may also renounce his part-ownership of the wall. That renunciation is allowed, but it is paired with an obligation that survives it: the owner must still bear the cost of all repairs and work necessary to prevent any damage the demolition may cause to the party wall. Giving up your share of the wall is not a way to sidestep that cost.
The obligation is tied specifically to the demolition
The text limits this financial responsibility to repairs and work needed on this occasion only, meaning the protective work made necessary specifically because of the demolition taking place. It is framed as a consequence of tearing your building down next to a wall you share with a neighbor, not an open-ended, permanent obligation to maintain the wall going forward once the demolition is finished.
Why the law puts the cost on the demolishing owner
A party wall supports structures on both sides. When one owner tears down their building, the wall can be left exposed, weakened, or otherwise put at risk of damage that would not have happened if both buildings had remained standing. Since it is that owner's decision to demolish that creates the risk, the law places the cost of preventing damage to the shared wall on the owner who is doing the demolishing, rather than splitting it with the neighbor.
What this means before you demolish
If your house shares a party wall and you are planning to tear it down, the practical takeaway is that you should expect to shoulder whatever repair or protective work is needed to keep the shared wall from being damaged in the process, regardless of whether you also choose to give up your part-ownership of it. Assessing what protective work the wall will actually need is a separate, practical question that depends on the wall's condition and how the demolition is carried out.