What to do when your subletter won't leave
First, read the sublet agreement, lease, and every notice. Confirm the agreed end date, payments, communications, and whether the person is a subtenant, co-tenant, or guest under the facts. Those distinctions matter.
Do not change locks, shut off utilities, remove property, or threaten the person out. A master tenant may be treated as a landlord toward a subtenant and may need to use a legal eviction process. Get advice before serving a notice or accepting further rent.
Document the situation and contact the Rent Board or a California housing lawyer promptly. Acting fast is important; improvising can make the dispute much worse.
Source: SF roommate and subtenant guidance.