The roommate has no tenant rights. He was a guest; once you ask him to leave and he doesn't, he is a trespasser. You can have him removed as a trespasser, or you can lock him out. You do have a duty to let him get his belongings.
The short answer, which I know is not very helpful, is "it depends". We first need to come to a conclusion about what legal status your friend has. There are a couple of facts you dont mention that are important to answering this question:
1) Are you the owner of the property or are you renting it from a landlord?
2) If you are the owner was it your intention that he have exclusive use of the garage for the duration of his stay with you? Did you still intend to make use of the garage yourself in some way?
In California a lodger is someone who rents a room within a dwelling shared by the owner of the property but the owner of the property still retains the ability to use the room/space that the lodger is living in for their own needs. The general rule is that a lodger must be given notice equal to the rent period (ie if they pay rent monthly then 30 days, if they pay weekly then a week).
3) I know you said that he never paid rent to you but was there any agreement about him paying rent when he moved in?
If so then this is the period of notice that you are most likely to have to give.
If you are tenants then the friend is instead more likely to be a guest or a sublessee. If your lease with the landlord allows you to "sublet or assign" your interests to another person then he might be a sublessee. If he is a subleasee, then it is most likely that you would also have to give notice according to the rental period, as discussed above under "lodger".
If you are not permitted to sublease or assign under your lease with the landlord then it is likely that your friend is a "guest". A guest is entitled to stay only as long as the tenant (you) wishes him to do so and can be asked to leave at any time. Theoretically, if he remained after you asked him to leave as a guest, he becomes a trespasser who can be removed without further notice or process by law enforcement.
The practical reality is, however, that many law enforcement jurisdictions will not remove someone who has been livivg at a property without at least some process being undertaken. What process is required is dependent upon a review of those facts you have not discussed here.
(This response is general legal information that is not intended to create, and does not create, an attorney client relationship between the questioner and Chantler Law Offices.)