The direct and succinct answer to your question is nothing.
Is the contractor licensed? If not, any lien is unenforceable, and your "contractor" is a criminal. You should should report such a situation to the police, District Attorney, and/or the Contractors State License Board (CSLB). In the likely event that he is licensed, here are some thoughts/options.
1. Look at the CSLB website. Lots of facts are missing from your post. There may be good grounds for an administrative complaint by you that could lead to an enforcement action by the CSLB, and an enforceable order in your favor. NOTE: you don't have to pay anything for this approach.
2. Do nothing. The law is likely on your side in terms of the contractor's incapacity to collect more than the value of his services. The law requires that the contractor serve you with notice of the lien. If the contractor records an unsupported lien, you can take action to clear it with via the CSLB, an attorney or both. Not cheap, fast or fun, but can be done.
3. Hire an attorney to try to negotiate a "settlement" agreement with the contractor. Most contractors (particularly shady ones), are very hard pressed for funds these days. Even though you'll have to hold your nose throughout this process, buying certainty may be cheaper and faster than anything else, and provide valuable peace of mind.
When I respond to a question posted on Avvo, I provide information for a general purpose. In reviewing my answer, you are specifically warned that your use of, or reliance upon any response that I provide would be a bad idea. I do not have all relevant background or facts related to your matter, and am not in a position to give you legal advice. Further, your review, use of, or reliance upon any response by me does not establish an attorney-client relationship between us and does not qualify as a legal consultation for any purpose.
If he wants to record a lien, you cannot stop him. All you can do is send a letter documenting what happened and threatening to sue him for slander of title if he records an invalid lien. However, to do that you first have to prevail in the lawsuit in which he forecloses the lien.
However, you are presuming he will file a lien--it sounds like you are more or less even. Perhaps the better letter to send is one that sets forth an accounting, alleges you are more or less even and proposes a walk away subject to the warranties for his work remaining in effect.
No mechanic's lien is valid unless it seeks the reasonable value of work actually installed at the property but not paid for, though as other attorneys here have noted, you can't prevent someone from recording any claim of lien, valid or invalid. If the contractor records a claim of mechanic's lien, he has 90 days within which to file a lawsuit to foreclose on the lien; otherwise it expires. You would have to seek to expunge the lien if the contractor refuses to withdraw it, but you may seek costs and some attorney fees incurred. In future, check the CSLB web site for tips before hiring a home improvement contractor. It is illegal to take more than 10% or $1,000 down, whichever is less--no exceptions. Give a call if you have questions: (949) 455-0600. Good luck.
As the others have stated you can't physically prevent him from placing a lien on your property. If does wrongfully record a mechanic's lien you have a statutory mechanism to remove it. California Civil Code Section 3154, provides an owner of property a legal means to have a null and void Mechanic’s Lien expunged from their property.
The above statement does not create an attorney-client relationship and the submitting party should not consider the responding their attorney.