Adding fiber and either fish or vegetable oil to a cat's diet are some home remedies for hairballs in cats. A cat that exhibits gagging behavior, constipation and/or diarrhea for more than a day requires veterinary evaluation.
Feeding a cat a teaspoon of canned pumpkin provides fiber that can help hairballs pass through the digestive system. Feeding the cat small pieces of carrot, apple or sweet potato can help accomplish this as well. It is best to check with a veterinarian before feeding a cat other fruits or vegetables because some can be harmful.
Adding fish oil, flaxseed oil or safflower oil to a cat's food helps provide lubrication in the digestive tract that may allow a hairball to pass through more easily. Using 1/8 teaspoon slippery elm accomplishes this as well.
Prevention is the best remedy for hairballs in cats. Grooming a cat regularly removes much of the fur that can cause the development of hairballs. If a cat grooms excessively, distracting the cat with a toy or otherwise playing with it helps reduce the possible ingestion of fur that can cause hairballs. Specially formulated commercial foods are available that discourage the formation of hairballs. These foods are high in fiber and other ingredients that improve the skin and coat while minimizing shedding.