Lifestyle changes can help prevent gallbladder problems. Because obesity is one of the major risk factors for gallstones, gradual weight loss can help. Eat a mostly plant-based diet, limit or eliminate red meat, and make sure to get plenty of exercise. If you're at high risk for gallstones, you can also talk to your healthcare provider about medication that can help prevent them.