A dog food rich in fiber and containing anti-inflammatory properties can help prevent scooting. Ingredients like sweet potatoes, flaxseed, and fish oil not only provide adequate fiber but also help reduce inflammation that could lead to anal gland impactions.