Foods high in dietary fibre and moisture, such as canned pumpkin, sweet potatoes, and wet canned dog food, may relieve or prevent constipation. Pumpkin puree is excellent for providing extra moisture and fibre, facilitating normal bowel movements.
Dogs typically like the taste of pumpkin puree, which can be added to their meals or given as a treat. However, if you plan to feed pumpkin, use 100% pumpkin product and not pumpkin pie filling.
With your vet's approval, olive oil and coconut oil can also be added to the pet's diet. Olive oil and coconut oil may soften stool. These oils should be given in small quantities and monitored closely, as they can cause loose stools and other issues if given in excess.
Keep in mind that oils usually don't help with current compaction. They're better for preventing compaction in dogs.