Believe it or not, today is National Hairball Awareness Day. Those of us with cats, all know that retching noise announcing an upcoming hairball. Strangely, hairballs always appear just when all the paper towels are gone. Not only are hairballs disgusting, they can also be dangerous to your pet. Some cats have actually died from choking on the swallowed fur. The best and easiest way to avoid hairballs is to brush your cat. This can be daunting, but needs to be done. If your cat is like mine, the fur sheds, and sheds, and sheds, until amazement is expressed that Fluffy isn't bald.
Another way to avoid hairballs is feeding special hairball reducing food. The high fiber in such food aids in the movement of fur blobs. I also understand canned pumpkin fed once or twice a week will have the same effect. The trick is getting your cat to eat it. Mine certainly won't.
Providing plenty of water will keep your cat's system running smoothy. I'm partial to pet water fountains that provide a constantly moving stream like that outdoors. The moving water will attract your cat, and encourage the drinking of liquid.
Lastly, make sure your cat gets enough exercise. Throw a purchased toy, or crumpled wad of paper, so your cat can chase it. A new puppy would work well too. Then again, maybe not!
In any case, the best of luck with all hairballs.