My name is XXXXX XXXXX I will be assisting you with your legal question.
You can attempt to call the police and ask them to have him removed by telling them that he was a guest who won't leave and has no lease
agreement or rights to be in the building. The police do not have to help you here, and may tell you that this is a civil matter for you to handle on your own. If they say that, then you will have to actually file an eviction action against him the the SF courts.
You first need to send a three day eviction notice. You can do this immediately, using the following form: http://www.scribd.com/doc/82508677/Eviction-N otice?utm_source=1014&utm_campaign=Scribd+Search&keyword=3%20day%20eviction%20notice%20california&mtype=e&ad=29027503716&pkw=3%20day%20eviction%20notice%20california&mkwid=NfgO1xan_dc&pcrid=29027503716&pmt=e&plc=&gclid=CPKqmP2zrroCFQLl7AodUgsAFA
If after 3 days he has not left, then you file the eviction suit. To file the eviction, follow the directions found on this site: http://www.sfsuperiorcourt.org/self-help/evictions
Please let me know if you have any further questions. Please also kindly consider rating my answer positively so that I am credited by the website for my work on your question. Rating positively does not cause an additional charge and does not prevent us from further discussing your questions.