Yes. The California rule against noncompetition agreements has an exception for the sale of a business. The agreement must still be reasonable in place and time; the same town is probably a reasonable place.
I would have a lawyer review the noncompetition agreement as well as every other aspect of the sale.
I agree with Mr. Eschen and would extend on his point to say that if you are purchasing a business you should have an attorney involved for more than just this particular issue. There are a lot a hidden traps involved in the purchasing of an on-going business. Even taking over a small, inconspicuous business might be walking into a mountain of headaches that the previous own has failed to address (i.e., zoning, taxes, licensing, on-going vendor contracts, etc.). If you are willing to spend money to purchase a business, spend the money to do it right. If you don't it might cost you much more in the future. Good luck.
The comments by this author to questions posted on Avvo are designed to foster a general understanding of what might be the law governing the area of the legal problem stated and suggest what might be the approach to finding a legal solution. Under no circumstances is this author acting as the attorney for the party who posted the question or as the attorney for subsequent readers to the question or response and no attorney client relationship is being formed. This attorney's comments are not intended to be a substitute for getting legal advice from a licensed attorney. A reader of this author's comments should never act on the information provided in these comments as though these comments were legal advice and should always seek legal advice in a personal consultation with an attorney in their jurisdiction before taking action. The information provided here is not intended to cover every situation with similar facts. Please remember that the law varies between states and other countries and is always changing through actions of the courts and the Legislature. In accordance with IRS regulations, I must inform you that any US tax advice contained in this message was not intended or written to be used, and cannot be used, for the purpose of avoiding penalties that may be imposed under federal tax law. By regulation, a taxpayer cannot rely on professional advice to avoid federal tax penalties unless that advice is reflected in a comprehensive tax opinion that conforms to strict requirements.
My colleagues are correct that non-competes are legal in connection with the sale of a business so that the limitations on time and geography are reasonable (e.g. not the whole world and forever). Having a lawyer and CPA involved in this transaction may cost "a dollar" today but will save you "ten dollars" in the years to come. Good luck with the venture.
The above is general legal and business analysis. It is not "legal advice" but analysis, and different lawyers may analyse this matter differently, especially if there are additional facts not reflected in the question. I am not your attorney until retained by a written retainer agreement signed by both of us. I am only licensed in California. See also avvo.com terms and conditions item 9, incorporated as if it was reprinted here.
My colleagues' answers are somewhat correct but somewhat misleading.
If the seller were the owner of a legal entity (partnership, LLC or corporation), I would agree with their answers, which refer to the sale of a business. However, you expressly stated that the seller is a sole proprietor. In that situation, the non-compete provision is enforceable only if the individual sells "the goodwill of a business" (please see the post at the link below, which includes a link to the applicable statute).
Accordingly, it is especially important, if you are contemplating such a transaction, that you have a lawyer prepare, and an accountant review, the purchase-and-sale agreement to ensure that it expressly and appropriately identifies and values the goodwill being sold.
This information does not constitute legal advice and does not establish an attorney-client relationship.
It is possible to buy a business in California that includes a non-compete clause, but the non-complete clause must be narrow and the restrictions must be related to protecting the goodwill of the business. I strongly suggest that you contact a lawyer to help you with this language. It is easy to get this language wrong and then your non-compete will be useless.