Yes, if code is only a liability then just delete the code and poof liability is gone.

Would it be fair to say that complexity is a liability, and LOC is an (approximate) measure of complexity?

That’s just the same statement with an extra step.