Are you regularly grooming your cat? I use something called a "Furminator" that sheds out the undercoat, and on cats that don't like that I use an old-fashioned "rattail" brush. Older cats may shed more, and if you don't help them get rid of the hair, they will get hairballs. I often groom those of my cats that like it, and they have no hairball problems. I have only one cat that hates to be groomed, and he does upchuck hairballs sometimes.
I think I'm on my 14th lifetime cat, mostly rescued ones.