I have shorthaired cats and they usually don’t have hairballs. But when they do, I found a hairball remedy for my cats that is better for them than the normal store bought remedies that contain mineral oil or petroleum jelly. You see, because mineral oil is also obtained from petroleum, it is not good for our kitties to ingest on a regular basis (you should not ingest anything that the body doesn't readily absorb). See
EWG - Environmental Working Group for more information on mineral oil and petroleum jelly.
The best hairball remedy surprisingly is “Olive Oil“
I give my cats a little olive oil (extra virgin) when they seem to need it.
How Much to Give your cat?