Foods that have insoluble fiber can help prevent constipation. Insoluble fiber, found in certain fruits, vegetables, and grains, keeps your digestive system moving.