Your cat is in a really old age. I'm not trying to scare you but its near to the end of life for him. Take him to a doctor
My cat is a 19 yr male. He has been sick a couple of times yellow bile, hasnt eaten for 3 days. He purrs when I stroke him but turns his back on me as if I have done something wrong and hes mad at me about something. Isn't going out, and just staying in. What could be wrong with my cat?
19 is a really big age! My cat is 14 in a few days and shes getting on a bit. Shes vomiting abit too. I'm going to take her the vets. I hate to say this but I thibk your cat is getting on himself. He might want prefer to spend the last of his life in peace. Purring can also mean pain or something is wrong. I have had cats all my life so I understand their body language and how they are feeling. Your cat may be telling you its time for him to leave this world. He might not be annoyed with you. He might just want you to understand how he feels. If he wants to be left alone etc. Hope hes okay though x hope I helped! :)